From 8ac2af279db3c7a95deec9f41bc01d4dd563314b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Yule=20B=C3=A4dorf?= Date: Wed, 3 Apr 2024 21:47:27 +0200 Subject: [PATCH] logins: fix admin login merging --- logins/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/logins/default.nix b/logins/default.nix index 3168d54..374b513 100644 --- a/logins/default.nix +++ b/logins/default.nix @@ -4,10 +4,10 @@ in { flake = { logins = { - admins = lib.lists.foldl (logins: adminConfig: logins // { - sshPubKeys = lib.attrsets.attrValues adminConfig.sshPubKeys; - wireguardDevices = if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else []; - }) {} (lib.attrsets.attrValues admins); + admins = lib.lists.foldl (logins: adminConfig: { + sshPubKeys = logins.sshPubKeys ++ (lib.attrsets.attrValues adminConfig.sshPubKeys); + wireguardDevices = logins.wireguardDevices ++ (if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else []); + }) { sshPubKeys = []; wireguardDevices = []; } (lib.attrsets.attrValues admins); robots.sshPubKeys = lib.attrsets.attrValues robots; }; };