logins: check for missing wireguard device attribute

This commit is contained in:
Benjamin Yule Bädorf 2024-04-03 21:17:38 +02:00 committed by b12f
parent 147ed44b9a
commit 83125ae472
Signed by: pub.solar gitea
GPG key ID: F0332B04B7054873

View file

@ -6,7 +6,7 @@ in {
logins = { logins = {
admins = lib.lists.foldl (logins: adminConfig: logins // { admins = lib.lists.foldl (logins: adminConfig: logins // {
sshPubKeys = lib.attrsets.attrValues adminConfig.sshPubKeys; sshPubKeys = lib.attrsets.attrValues adminConfig.sshPubKeys;
wireguardDevices = adminConfig.wireguardDevices; wireguardDevices = if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else [];
}) {} (lib.attrsets.attrValues admins); }) {} (lib.attrsets.attrValues admins);
robots.sshPubKeys = lib.attrsets.attrValues robots; robots.sshPubKeys = lib.attrsets.attrValues robots;
}; };