refactor: make the secret helper a bit easier to read

This commit is contained in:
winston 2023-07-14 17:25:14 +02:00
parent b0e3bc0f75
commit 39d692ab1e
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -1,7 +1,7 @@
{
{lib, ...}: {
age.secrets = with builtins;
listToAttrs (map (k: {
name = substring 0 (stringLength k - 4) k;
name = lib.removeSuffix ".age" k;
value = {file = ./. + "/${k}";};
}) (attrNames (import ./secrets.nix)));
}