Gpg: Add gpg_find to locate keys.

This commit is contained in:
Dmitry Voronin 2024-10-22 00:24:36 +03:00
parent 832319969a
commit 39dcd30b9e
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 19 additions and 0 deletions

View file

@ -73,5 +73,19 @@
_iterate_targets process ''${targets[@]}
}
# Find user keys using keyservers.
# Usage: gpg_find <EMAIL>
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}"
}
'';
}

View file

@ -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;