filter gpg keys in keys dir
This commit is contained in:
parent
57c12d516b
commit
1016205470
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ let
|
|||
|
||||
keysDir = ../../../files/keys;
|
||||
keys = lib.attrsets.mapAttrsToList (name: type: "${keysDir}/${name}") (builtins.readDir keysDir);
|
||||
gpgKeys = builtins.filter (path: lib.strings.hasSuffix "asc" path) keys;
|
||||
|
||||
in
|
||||
{
|
||||
|
@ -12,7 +13,7 @@ in
|
|||
# install keys into gpg keyring
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
publicKeys = map (file: { source = file; trust = 5; }) keys;
|
||||
publicKeys = map (path: { source = path; trust = 5; }) gpgKeys;
|
||||
};
|
||||
|
||||
# global gpg agent
|
||||
|
|
Loading…
Add table
Reference in a new issue