fix(secrets): lists of lists are wrong, prepend the globals

Otherwise, I won't be in the list.

This adds the active infra core members of Lix as well.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
raito 2024-10-06 11:21:43 +02:00
parent 9ad7e7b139
commit 192ba49f7c

View file

@ -2,9 +2,11 @@ let
keys = import common/ssh-keys.nix;
commonKeys = {
global = [ keys.users.raito ];
lix = [ keys.users.jade ];
floral = [ keys.users.delroth ];
# WARNING: `keys.users.*` are *lists*, so you need concatenate them, don't put them into lists!
# Otherwise, agenix will be confused!
global = keys.users.raito;
lix = keys.users.hexchen ++ keys.users.jade;
floral = keys.users.delroth;
};
secrets = with keys; {
@ -58,7 +60,7 @@ let
mkSecretListFor = tenant:
map (secretName: {
name = "secrets/${tenant}/${secretName}.age";
value.publicKeys = secrets.${tenant}."${secretName}" ++ commonKeys.${tenant};
value.publicKeys = secrets.${tenant}."${secretName}" ++ commonKeys.global ++ commonKeys.${tenant};
}) (builtins.attrNames secrets.${tenant});
in
builtins.listToAttrs (