diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-10 04:32:33 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-10 04:32:38 +0530 |
| commit | 96ec0f89101ea414e764565e022b9bc83a96071c (patch) | |
| tree | 008b0d9dd79cc19afa65df40c79563dc67cf897b /modules/security/gopass/default.nix | |
| parent | f1787032594f7ca1a6521f5665a48bb70605d222 (diff) | |
| download | home-manager-config-96ec0f89101ea414e764565e022b9bc83a96071c.tar.gz home-manager-config-96ec0f89101ea414e764565e022b9bc83a96071c.zip | |
fix(security/ssh): fixed the loading ssh key from gopass
Now on every home-manager switch we run a script that loads the key form
gopass to gpg-agent, then the gpg-agent is responsible for storing it.
Anytime gopass changes the ssh key we must run home-manager switch to
load the ssh key into gpg agent.
Diffstat (limited to 'modules/security/gopass/default.nix')
| -rw-r--r-- | modules/security/gopass/default.nix | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/modules/security/gopass/default.nix b/modules/security/gopass/default.nix index 4cf9182..e78e595 100644 --- a/modules/security/gopass/default.nix +++ b/modules/security/gopass/default.nix @@ -5,30 +5,6 @@ pkgs, ... }: -let - gopassKeys = config.security.ssh.gopassKeys; - - gopassSshLoadScript = pkgs.writeShellApplication { - name = "gopass-ssh-load"; - runtimeInputs = [ - config.security.gopass.package - config.security.gpg.package - config.security.ssh.package - config.terminal.bash.package - ]; - text = - builtins.replaceStrings - [ - "@@GOPASS_SSH_KEYS@@" - "@@GNUPGHOME@@" - ] - [ - (lib.concatStringsSep " " gopassKeys) - config.home.sessionVariables.GNUPGHOME - ] - (builtins.readFile ./gopass-ssh-load.sh); - }; -in { options.security.gopass = { enable = lib.mkEnableOption "Enables gopass."; @@ -38,15 +14,6 @@ in default = config.programs.password-store.package; description = "The gopass package to use."; }; - ssh-agent = { - enable = lib.mkEnableOption "gopass-backed SSH keys for git"; - package = lib.mkOption { - type = lib.types.package; - readOnly = true; - default = gopassSshLoadScript; - description = "The gopass-ssh-load script package."; - }; - }; sync = { enable = lib.mkEnableOption "Enables git-backed syncing of the gopass data directory."; remote = lib.mkOption { @@ -127,10 +94,6 @@ in }; }) - (lib.mkIf config.security.gopass.ssh-agent.enable { - home.packages = [ config.security.gopass.ssh-agent.package ]; - }) - (lib.mkIf config.security.gopass.sync.enable { home.activation.gopassSyncInit = let |
