diff --git a/home/modules/nfc/proxmark3.nix b/home/modules/nfc/proxmark3.nix index 1296350..69405ab 100644 --- a/home/modules/nfc/proxmark3.nix +++ b/home/modules/nfc/proxmark3.nix @@ -15,7 +15,7 @@ in config = lib.mkIf cfg.enable { home.packages = [ - pkgs.proxmark3 + (pkgs.proxmark3.override { withGeneric = true; }) ]; }; } diff --git a/hosts/astyanax/default.nix b/hosts/astyanax/default.nix index f8323bd..b474402 100644 --- a/hosts/astyanax/default.nix +++ b/hosts/astyanax/default.nix @@ -40,6 +40,7 @@ in (import ../../modules/secrets { inherit lib inputs config; }) ../../modules/docker ../../modules/syncthing + ../../modules/nfc ]; home-manager.users.${username} = import ../../home/hosts/astyanax { @@ -58,6 +59,7 @@ in secrets.username = username; docker.user = username; + nfc.user = username; nix.settings.secret-key-files = [ config.sops.secrets.nix_signing_key_astyanax.path ]; diff --git a/modules/nfc/default.nix b/modules/nfc/default.nix new file mode 100644 index 0000000..477b2e4 --- /dev/null +++ b/modules/nfc/default.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: + +let + cfg = config.nfc; +in +{ + options.nfc = { + user = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + }; + }; + config = lib.mkIf (cfg.user != null) { + users.users.${cfg.user}.extraGroups = [ "dialout" ]; + }; +}