diff options
Diffstat (limited to 'modules/security/gopass/default.nix')
| -rw-r--r-- | modules/security/gopass/default.nix | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/modules/security/gopass/default.nix b/modules/security/gopass/default.nix index fa5e486..4d223e9 100644 --- a/modules/security/gopass/default.nix +++ b/modules/security/gopass/default.nix @@ -16,11 +16,17 @@ let openssh bash ]; - text = '' - export GNUPGHOME="${config.home.sessionVariables.GNUPGHOME}" - export GOPASS_SSH_KEYS="${lib.concatStringsSep " " gopassKeys}" - ${builtins.readFile ./gopass-ssh-load.sh} - ''; + text = + builtins.replaceStrings + [ + "@@GOPASS_SSH_KEYS@@" + "@@GNUPGHOME@@" + ] + [ + (lib.concatStringsSep " " gopassKeys) + config.home.sessionVariables.GNUPGHOME + ] + (builtins.readFile ./gopass-ssh-load.sh); }; in { @@ -53,6 +59,26 @@ in }; }; + # use a different username and email to show these commits are auto + # generated by gopass + programs.git.includes = lib.mkIf config.development.git.enable [ + { + condition = "gitdir:${config.programs.password-store.settings.PASSWORD_STORE_DIR}/"; + contents = { + user = { + name = "Gopass of ${config.home.username}"; + email = "${config.home.username}@gopass.localhost"; + }; + commit = { + gpgSign = false; + }; + tag = { + gpgSign = false; + }; + }; + } + ]; + home.sessionVariables = { PASSWORD_STORE_DIR = config.programs.password-store.settings.PASSWORD_STORE_DIR; }; |
