fix(keys): unique is not in extra anymore
Some checks failed
Build all the nodes / netaccess01 (push) Successful in 21s
Build all the nodes / netcore01 (push) Successful in 21s
Build all the nodes / netcore00 (push) Successful in 22s
Build all the nodes / netcore02 (push) Successful in 26s
Build all the nodes / ap01 (push) Successful in 36s
Build the shell / build-shell (push) Successful in 30s
Build all the nodes / geo01 (push) Successful in 1m4s
Run pre-commit on all files / pre-commit (push) Successful in 37s
Build all the nodes / bridge01 (push) Successful in 1m15s
Build all the nodes / hypervisor01 (push) Successful in 1m16s
Build all the nodes / rescue01 (push) Successful in 1m16s
Build all the nodes / build01 (push) Successful in 1m18s
Build all the nodes / hypervisor02 (push) Successful in 1m18s
Build all the nodes / cof02 (push) Successful in 1m19s
Build all the nodes / tower01 (push) Successful in 1m18s
Build all the nodes / hypervisor03 (push) Successful in 1m22s
Build all the nodes / geo02 (push) Successful in 1m24s
Build all the nodes / web02 (push) Successful in 1m5s
Build all the nodes / web03 (push) Successful in 1m13s
Build all the nodes / compute01 (push) Successful in 1m45s
Build all the nodes / web01 (push) Successful in 1m43s
Build all the nodes / storage01 (push) Failing after 1m0s
Build all the nodes / vault01 (push) Failing after 1m59s

This commit is contained in:
Tom Hubrecht 2025-04-15 00:34:36 +02:00
parent 9f91f73270
commit 3748efa295
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc

View file

@ -7,7 +7,7 @@
{ meta, lib }:
let
inherit (lib.extra) setDefault unique;
inherit (lib.extra) setDefault;
getAttr = lib.flip builtins.getAttr;
in
@ -33,14 +33,14 @@ rec {
getNodeAdmins = node: meta.organization.groups.root ++ meta.nodes.${node}.admins;
# All keys needed for secret encryption
getSecretKeys = node: unique (getMemberKeys (getNodeAdmins node) ++ getNodeKeys [ node ]);
getSecretKeys = node: lib.unique (getMemberKeys (getNodeAdmins node) ++ getNodeKeys [ node ]);
# List of keys for all machines wide secrets
machineKeys = rootKeys ++ (getNodeKeys (builtins.attrNames meta.nodes));
mkSecrets = nodes: setDefault { publicKeys = unique (builtins.concatMap getSecretKeys nodes); };
mkSecrets = nodes: setDefault { publicKeys = lib.unique (builtins.concatMap getSecretKeys nodes); };
mkRootSecrets = setDefault { publicKeys = unique rootKeys; };
mkRootSecrets = setDefault { publicKeys = lib.unique rootKeys; };
machineKeysBySystem =
system: