gpg.nix (562B)
1 { pkgs, lib, nixosConfig, ... }: 2 3 let 4 stable = lib.versionOlder nixosConfig.system.nixos.release "24.05"; 5 in 6 { 7 home.packages = with pkgs; [ gnupg ]; 8 services = { 9 gpg-agent = { 10 enable = true; 11 enableSshSupport = true; 12 enableExtraSocket = true; 13 defaultCacheTtlSsh = 7200; 14 } // (if stable then { 15 pinentryFlavor = if (nixosConfig.modules.desktop.enable) then "gnome3" else "tty"; 16 } else { 17 pinentryPackage = if (nixosConfig.modules.desktop.enable) then pkgs.pinentry-gnome3 else pkgs.pinentry-tty; 18 }); 19 }; 20 } 21