From 0f095e1996116a4fc758d12a4c1650c6264f5830 Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Thu, 7 Sep 2023 03:05:30 +0200 Subject: [PATCH] use gpg for ssh --- modules/gpg.nix | 13 +++++++++++++ modules/thunderbird.nix | 1 + 2 files changed, 14 insertions(+) diff --git a/modules/gpg.nix b/modules/gpg.nix index fb38e8a..aee6ee3 100644 --- a/modules/gpg.nix +++ b/modules/gpg.nix @@ -3,7 +3,20 @@ programs.gpg.enable = true; services.gpg-agent = { enable = true; + + enableSshSupport = true; + sshKeys = ["A0B5D579ECACC45C51B2B38E317D346182083CD8"]; + maxCacheTtl = 86400; # 1 Day + maxCacheTtlSsh = 86400; # 1 Day }; + + # Disable gnome-keyring-ssh for gpg-agent to work + # https://github.com/NixOS/nixpkgs/issues/101616 + xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = '' + [Desktop Entry] + Type=Application + Hidden=true + ''; }; } diff --git a/modules/thunderbird.nix b/modules/thunderbird.nix index 063262f..7e900be 100644 --- a/modules/thunderbird.nix +++ b/modules/thunderbird.nix @@ -4,6 +4,7 @@ profiles.kristian = { isDefault = true; + withExternalGnupg = true; }; }; }