From 0a7afa2d1e576f05253b62c6b17e5e4873fbdebc Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Tue, 4 Aug 2026 20:01:06 +0530 Subject: feat: moved gpg data directory, other gopass ssh keys, script builder - Using ~/.local/share/gnupg/ for storing the data for gnupg, and made the necessary changes in all places to that effect - Additional ssh keys can be added to gopass under ssh/, which is on top of the git servers that already existed - Using pkgs.writeShellApplication for creating the scripts, stopped setting path for each dependency (creating a long PATH variable and thus finding binaries may take longer), instead using the inbuild dependency (runtimeInputs) for the scripts --- modules/scripts/gopass-ssh-load/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'modules/scripts/gopass-ssh-load/default.nix') diff --git a/modules/scripts/gopass-ssh-load/default.nix b/modules/scripts/gopass-ssh-load/default.nix index 002a4ac..e0a4615 100644 --- a/modules/scripts/gopass-ssh-load/default.nix +++ b/modules/scripts/gopass-ssh-load/default.nix @@ -6,10 +6,26 @@ }: let inherit ((import ../lib.nix { inherit lib pkgs; })) mkScriptModule; + + gitPlatformKeys = [ + "github" + "gitlab" + "bitbucket" + "codeberg" + "srht" + ]; + + gopassKeys = + lib.optionals config.development.git.useSSH gitPlatformKeys ++ config.security.ssh.extraGopassKeys; + base = mkScriptModule { name = "gopass-ssh-load"; path = ./script.sh; description = "Load SSH keys from gopass password store"; + env = { + GNUPGHOME = config.home.sessionVariables.GNUPGHOME; + GOPASS_SSH_KEYS = lib.concatStringsSep " " gopassKeys; + }; deps = with pkgs; [ config.security.gopass.package gnupg -- cgit v1.2.3