From a795f0824fb3d139f72b2fc675b3d52cc2ca1530 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 3168d54f..374b513f 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; }; };