diff --git a/home/hosts/astyanax/default.nix b/home/hosts/astyanax/default.nix index 64c7049c..d435aeff 100644 --- a/home/hosts/astyanax/default.nix +++ b/home/hosts/astyanax/default.nix @@ -55,6 +55,7 @@ shell.bash.aliases.lang-js = true; shell.bash.addBinToPath = true; my.yubikey.enable = true; + nfc.enable = true; programs = { home-manager.enable = true; diff --git a/home/modules/nfc/default.nix b/home/modules/nfc/default.nix index 6c3c6751..ee6623b4 100644 --- a/home/modules/nfc/default.nix +++ b/home/modules/nfc/default.nix @@ -1,5 +1,21 @@ { - imports = [ - ./proxmark3.nix - ]; + config, + lib, + pkgs, + ... +}: + +let + cfg = config.nfc; +in +{ + options.nfc = { + enable = lib.mkEnableOption "NFC tools"; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ + (pkgs.proxmark3.override { withGeneric = true; }) + ]; + }; } diff --git a/home/modules/nfc/proxmark3.nix b/home/modules/nfc/proxmark3.nix deleted file mode 100644 index 6f4c3e93..00000000 --- a/home/modules/nfc/proxmark3.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = [ - (pkgs.proxmark3.override { withGeneric = true; }) - ]; -} diff --git a/modules/nfc/default.nix b/modules/nfc/default.nix index ff124a74..5ef0befa 100644 --- a/modules/nfc/default.nix +++ b/modules/nfc/default.nix @@ -6,7 +6,7 @@ let in { options.nfc = { - enable = lib.mkEnableOption "NFC device access"; + enable = lib.mkEnableOption "NFC"; }; config = lib.mkIf cfg.enable { users.users.${username}.extraGroups = [ "dialout" ];