nix-config/modules/secrets/gpg.nix

30 lines
667 B
Nix

{
config,
lib,
pkgs,
vars,
...
}: {
home-manager.users.${vars.user} = {
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
enableFishIntegration = true;
enableZshIntegration = true;
pinentryFlavor = "gnome3";
};
# Prevent clobbering SSH_AUTH_SOCK
home.sessionVariables.GSM_SKIP_SSH_AGENT_WORKAROUND = "1";
# Disable gnome-keyring ssh-agent
xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = ''
${lib.fileContents "${pkgs.gnome3.gnome-keyring}/etc/xdg/autostart/gnome-keyring-ssh.desktop"}
Hidden=true
'';
};
}