From 924ec30e7075ea7a9dbac569a537d876f9146850 Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Thu, 4 Apr 2024 17:06:23 +0200 Subject: refactor: move users/sils dir to hm --- hm/gpg/default.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 hm/gpg/default.nix (limited to 'hm/gpg/default.nix') diff --git a/hm/gpg/default.nix b/hm/gpg/default.nix new file mode 100644 index 0000000..aecb4d4 --- /dev/null +++ b/hm/gpg/default.nix @@ -0,0 +1,26 @@ +{ + pkgs, + lib, + ... +}: { + programs.gpg = { + enable = true; + }; + services.gpg-agent = { + enable = true; + defaultCacheTtl = 60 * 5; + defaultCacheTtlSsh = 60 * 5; + pinentryPackage = pkgs.pinentry-curses; + enableSshSupport = true; + sshKeys = ["4077454831C98FE4BE4A9C167186C5A63615B790"]; + }; + programs.zsh.initExtraFirst = lib.mkBefore '' + current_tty="$(tty)" + tty() { echo "$current_tty"; } + SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + gpg-connect-agent /bye + ''; + home.sessionVariables = { + GNUPGHOME = lib.mkForce ""; + }; +} -- cgit 1.4.1