diff --git a/home/program/bash/module/Gpg.nix b/home/program/bash/module/Gpg.nix index beb8d67..ed899c5 100644 --- a/home/program/bash/module/Gpg.nix +++ b/home/program/bash/module/Gpg.nix @@ -73,5 +73,19 @@ _iterate_targets process ''${targets[@]} } + + # Find user keys using keyservers. + # Usage: gpg_find + function gpg_find() { + local email="''${1}" + + if [[ "''${email}" = "" ]]; then + help gpg_find + return 2 + fi + + gpg --locate-keys "''${email}" \ + || gpg --locate-keys --auto-key-locate hkps://keys.openpgp.org "''${email}" + } ''; } diff --git a/home/program/default.nix b/home/program/default.nix index 0c0533e..8ec1fb8 100644 --- a/home/program/default.nix +++ b/home/program/default.nix @@ -8,6 +8,11 @@ in gpg = { enable = true; inherit (secret.crypto) publicKeys; + mutableKeys = true; + mutableTrust = true; + settings = { + keyserver = "hkps://keys.openpgp.org"; + }; }; firefox = import ./firefox args;