diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-08-02 21:36:04 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-08-02 21:36:04 +0200 |
| commit | 923a2f6b4bd124e6326c86fdcb4f541dd06b2bd5 (patch) | |
| tree | 290776c4db2108280476e5b41ce3fc739d361ed0 /modules/by-name/gp/gpg/module.nix | |
| parent | modules/default/projects: Add one (diff) | |
| download | nixos-config-923a2f6b4bd124e6326c86fdcb4f541dd06b2bd5.zip | |
modules/default/unison: Move the pathsTo* rules to their respective modules
Diffstat (limited to 'modules/by-name/gp/gpg/module.nix')
| -rw-r--r-- | modules/by-name/gp/gpg/module.nix | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/modules/by-name/gp/gpg/module.nix b/modules/by-name/gp/gpg/module.nix index d5136e92..769bcab6 100644 --- a/modules/by-name/gp/gpg/module.nix +++ b/modules/by-name/gp/gpg/module.nix @@ -22,7 +22,35 @@ in { }; config = lib.mkIf cfg.enable { - soispha.programs.qutebrowser.key = "8321 ED3A 8DB9 99A5 1F3B F80F F268 2914 EA42 DE26"; + soispha = { + programs = { + qutebrowser.key = "8321 ED3A 8DB9 99A5 1F3B F80F F268 2914 EA42 DE26"; + + zsh.integrations.gpg = '' + export GPG_TTY=$(tty) + + # Magic copied from the gpg-agent manual + unset SSH_AGENT_PID + if [ "''${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + fi + + + # Ensure that get gpg agent is started (necessary because ssh does not start it + # automatically and has it's tty updated) + gpg-connect-agent /bye + ''; + }; + + services.unison.pathsToIgnore = [ + # "Unknown filetype" (and there is no real reason to (try to) synchronize sockets) + "~/.local/share/gnupg/S.gpg-agent" + "~/.local/share/gnupg/S.gpg-agent.browser" + "~/.local/share/gnupg/S.gpg-agent.extra" + "~/.local/share/gnupg/S.gpg-agent.ssh" + "~/.local/share/gnupg/S.scdaemon" + ]; + }; home-manager.users.soispha = { programs.gpg = { @@ -74,20 +102,5 @@ in { }; }; }; - - soispha.programs.zsh.integrations.gpg = '' - export GPG_TTY=$(tty) - - # Magic copied from the gpg-agent manual - unset SSH_AGENT_PID - if [ "''${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then - export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" - fi - - - # Ensure that get gpg agent is started (necessary because ssh does not start it - # automatically and has it's tty updated) - gpg-connect-agent /bye - ''; }; } |
