home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 6f0eaed71585aa8f88bd19fdbdb6a9f1002c6320
parent dbe95feb0bdf6a15448c80b99f3e9e8fa8e21b77
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Wed,  3 Jan 2024 09:55:34 +0100

users/vincent: handle desktop/server gpg configuration better

If using a desktop, let's set it to gnome3, otherwise tty.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Musers/vincent/core/gpg.nix | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/users/vincent/core/gpg.nix b/users/vincent/core/gpg.nix @@ -1,5 +1,8 @@ -{ pkgs, ... }: +{ pkgs, lib, nixosConfig, ... }: +let + pinentry = if (nixosConfig.modules.desktop.enable) then "gnome3" else "tty"; +in { home.packages = with pkgs; [ gnupg ]; services = { @@ -8,7 +11,7 @@ enableSshSupport = true; enableExtraSocket = true; defaultCacheTtlSsh = 7200; - pinentryFlavor = "gnome3"; + pinentryFlavor = pinentry; }; }; }