diff --git a/profiles/workspace/gnome3/default.nix b/profiles/workspace/gnome3/default.nix index 472121a..3d7b013 100644 --- a/profiles/workspace/gnome3/default.nix +++ b/profiles/workspace/gnome3/default.nix @@ -46,6 +46,7 @@ ExecStart = lib.mkForce "${pkgs.pass-secret-service}/bin/pass_secret_service --path ${config.environment.variables.PASSWORD_STORE_DIR}"; Type = "dbus"; + Environment = [ "GPG_TTY=/dev/tty1" "DISPLAY=:0" ]; BusName = "org.freedesktop.secrets"; }; Unit = rec { diff --git a/profiles/workspace/gpg.nix b/profiles/workspace/gpg.nix index 10fb590..ebce2b8 100644 --- a/profiles/workspace/gpg.nix +++ b/profiles/workspace/gpg.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: { +{ pkgs, lib, config, ... }: { services.pcscd.enable = true; services.udev.packages = [ pkgs.yubikey-personalization ]; @@ -11,6 +11,16 @@ pinentryFlavor = "gtk2"; }; + systemd.user.services.gpg-agent = { + Service = { + Environment = lib.mkForce [ + "GPG_TTY=/dev/tty1" + "DISPLAY=:0" + "GNUPGHOME=${config.home-manager.users.balsoft.xdg.dataHome}/gnupg" + ]; + }; + }; + programs.gpg = { enable = true; homedir = "${config.home-manager.users.balsoft.xdg.dataHome}/gnupg";