diff options
author | Soispha <soispha@vhack.eu> | 2023-07-29 15:03:33 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-29 15:03:33 +0200 |
commit | 918ba5d027c38be355bd40b56407201a8adc0eaa (patch) | |
tree | caa2b38b9617fafe3907063fdedf99aea455bcc8 /home-manager/config/gpg/default.nix | |
parent | Feat(flake): Add gpg-iso package output (diff) | |
download | nixos-config-918ba5d027c38be355bd40b56407201a8adc0eaa.tar.gz nixos-config-918ba5d027c38be355bd40b56407201a8adc0eaa.zip |
Fix(hm/conf/gpg): Add config for isimud
Diffstat (limited to 'home-manager/config/gpg/default.nix')
-rw-r--r-- | home-manager/config/gpg/default.nix | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/home-manager/config/gpg/default.nix b/home-manager/config/gpg/default.nix index 669f7ea1..9e11b04d 100644 --- a/home-manager/config/gpg/default.nix +++ b/home-manager/config/gpg/default.nix @@ -1,5 +1,6 @@ { config, + nixosConfig, sysLib, pkgs, ... @@ -12,19 +13,37 @@ onlykey-agent ]; }; -in { - programs.gpg = { - enable = true; - homedir = "${config.xdg.dataHome}/gnupg/onlykey"; - mutableKeys = true; - mutableTrust = true; - settings = { + settings = + if nixosConfig.networking.hostName == "isimud" + then {} + else { # Hardware-based GPG configuration agent-program = "${agent-program}/bin/onlykey-gpg-agent"; default-key = "Soispha <soispha@vhack.eu>"; # TODO add more }; + gpg-agent = + if nixosConfig.networking.hostName == "isimud" + then { + enable = true; + enableZshIntegration = true; + enableScDaemon = true; # smartcards and such things + pinentryFlavor = "tty"; + } + else { + enable = false; + enableZshIntegration = true; + enableScDaemon = true; # smartcards and such things + pinentryFlavor = "tty"; + }; +in { + programs.gpg = { + enable = true; + homedir = "${config.xdg.dataHome}/gnupg/onlykey"; + mutableKeys = true; + mutableTrust = true; + inherit settings; publicKeys = [ { source = ./keys/sils_at_sils.li; @@ -36,10 +55,7 @@ in { } ]; }; - services.gpg-agent = { - enable = false; - enableZshIntegration = true; - enableScDaemon = true; # smartcards and such things - pinentryFlavor = "tty"; + services = { + inherit gpg-agent; }; } |