From 9107ce034c6b9c56b665b0dbfa6c7aad215bb657 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 20 Dec 2023 16:53:42 +0100 Subject: [PATCH] nitrokey: Init --- modules/default.nix | 1 + modules/nitrokey.nix | 12 ++++++++++++ modules/unfree.nix | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 modules/nitrokey.nix diff --git a/modules/default.nix b/modules/default.nix index a3a083a..e8a3e8b 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -38,6 +38,7 @@ ./network-manager.nix ./nginx-interactive-index ./nginx.nix + ./nitrokey.nix ./nix.nix ./office.nix ./pipewire.nix diff --git a/modules/nitrokey.nix b/modules/nitrokey.nix new file mode 100644 index 0000000..93489ef --- /dev/null +++ b/modules/nitrokey.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: + +{ + hardware.nitrokey.enable = true; +} // (lib.mkIf config.sbruder.gui.enable { + environment.systemPackages = with pkgs; [ + # both depend on pypemicro, which is not needed, but nixpkgs requires it + # (even though it could have been optional: https://github.com/NixOS/nixpkgs/pull/183099#discussion_r933226708) + #nitrokey-app2 + #pynitrokey + ]; +}) diff --git a/modules/unfree.nix b/modules/unfree.nix index 9a5bfd2..83df37d 100644 --- a/modules/unfree.nix +++ b/modules/unfree.nix @@ -30,6 +30,11 @@ in "makemkv" # exception: runs in sandbox, only way to get DRM garbage to work properly "p7zip" # exception: rar source code is not free, but available; p7zip with `enableUnfree` includes it + # exception: used for programming the NitroKey, + # available under essentially a 3-BSD license with two additional restrictions: + # one usage restriction and one (pointless as the source is available) reverse engineering restriction + "nrfutil" + # games (okay if they run sandboxed) "osu-lazer" # also is free except for one dependency "steam"