aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-02-08 12:35:46 -0800
committerCaroline Larimore <caroline@larimo.re>2025-04-14 18:58:49 -0700
commitbd43b5fa64235b2145cdeeb7409cd11636e7754e (patch)
tree3cccd74c6da84e4ee9f22f6025803a704eb84d69
parentf94a9071e7ccad349af26add593e855cd9f88f32 (diff)
migration: gpg-agent
-rw-r--r--hosts/c-pc/configuration.nix10
-rw-r--r--snowfall/modules/home/tools/gpg/default.nix12
2 files changed, 12 insertions, 10 deletions
diff --git a/hosts/c-pc/configuration.nix b/hosts/c-pc/configuration.nix
index acf8ab2..eccae16 100644
--- a/hosts/c-pc/configuration.nix
+++ b/hosts/c-pc/configuration.nix
@@ -27,17 +27,7 @@
};
};
- programs = {
- gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- };
-
- dconf.enable = true;
- };
-
services = {
- pcscd.enable = true;
printing.enable = true;
hardware.openrgb.enable = true;
diff --git a/snowfall/modules/home/tools/gpg/default.nix b/snowfall/modules/home/tools/gpg/default.nix
index 7d69137..297d9d0 100644
--- a/snowfall/modules/home/tools/gpg/default.nix
+++ b/snowfall/modules/home/tools/gpg/default.nix
@@ -16,5 +16,17 @@ in {
};
programs.gpg.enable = true;
+
+ services.gpg-agent = {
+ enable = true;
+ enableSshSupport = true;
+ pinentryPackage = (pkgs.writeShellScriptBin "pinentry-wrapper" ''
+ if [[ -v DISPLAY ]]; then
+ exec ${pkgs.pinentry-gnome3}/bin/pinentry-gnome3 "$@"
+ fi
+
+ exec ${pkgs.pinentry-gnome3}/bin/pinentry-tty "$@"
+ '');
+ };
};
}