logins: fix admin login merging
All checks were successful
Flake checks / Check (pull_request) Successful in 6m36s
All checks were successful
Flake checks / Check (pull_request) Successful in 6m36s
This commit is contained in:
parent
c6a9c6a219
commit
8ac2af279d
|
@ -4,10 +4,10 @@
|
||||||
in {
|
in {
|
||||||
flake = {
|
flake = {
|
||||||
logins = {
|
logins = {
|
||||||
admins = lib.lists.foldl (logins: adminConfig: logins // {
|
admins = lib.lists.foldl (logins: adminConfig: {
|
||||||
sshPubKeys = lib.attrsets.attrValues adminConfig.sshPubKeys;
|
sshPubKeys = logins.sshPubKeys ++ (lib.attrsets.attrValues adminConfig.sshPubKeys);
|
||||||
wireguardDevices = if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else [];
|
wireguardDevices = logins.wireguardDevices ++ (if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else []);
|
||||||
}) {} (lib.attrsets.attrValues admins);
|
}) { sshPubKeys = []; wireguardDevices = []; } (lib.attrsets.attrValues admins);
|
||||||
robots.sshPubKeys = lib.attrsets.attrValues robots;
|
robots.sshPubKeys = lib.attrsets.attrValues robots;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue