diff --git a/extra/default.nix b/extra/default.nix index 2697f2e..73f60d5 100644 --- a/extra/default.nix +++ b/extra/default.nix @@ -1,8 +1,12 @@ +{ lib, ... }: +let + settings = import ./../settings.nix; +in { - imports = [ - ./bluray.nix - ./dvd.nix - ./yubikey.nix - ./wireguard.nix - ]; + # Optionally import modules for non-essential extras + imports = + lib.optionals settings.hardware.yubikey.enable [ ./yubikey.nix ] + ++ lib.optionals settings.dvd [ ./dvd.nix ] + ++ lib.optionals settings.bluray [ ./bluray.nix ] + ++ lib.optionals settings.networking.wireguard [ ./wireguard.nix ]; } diff --git a/extra/yubikey.nix b/extra/yubikey.nix index c087829..7a55373 100644 --- a/extra/yubikey.nix +++ b/extra/yubikey.nix @@ -2,11 +2,12 @@ services.pcscd.enable = true; # enable support for smart cards - environment.systemPackages = with pkgs; [ - # Yubikey stuff - yubioath-flutter # Yubico authentictor app for managing accounts - yubikey-manager # CLI tool for ykman - yubikey-manager-qt # GUI tool for ykman - pcsclite - ]; + environment.systemPackages = with pkgs; [ pcsclite ] + # Yubico authentictor app for managing accounts + ++ (lib.optionals settings.hardware.yubikey.authenticator [ yubioath-flutter ]) + # ykman CLI and Qt-GUI + ++ (lib.optionals settings.hardware.yubikey.ykman [ + yubikey-manager # CLI tool for ykman + yubikey-manager-qt # GUI tool for ykman + ]); } diff --git a/settings.nix b/settings.nix index af53d02..1254687 100644 --- a/settings.nix +++ b/settings.nix @@ -1,7 +1,23 @@ { hardware = { + # support for GPUs amdgpu = true; intelgpu = false; nvidiagpu = false; + + # support for yubikey and additional software + yubikey = { + enable = true; + # additional software + ykman = false; + authenticator = true; # flutter yubico authenticator + }; + }; + + dvd = true; # enable DVD decryption + ripping via Handbrake + bluray = true; # enable Bluray decryption (requires additional setup) + + networking = { + wireguard = true; # enable wireguard protocol }; }