logins: check for missing wireguard device attribute
All checks were successful
Flake checks / Check (pull_request) Successful in 7m4s

This commit is contained in:
Benjamin Yule Bädorf 2024-04-03 21:17:38 +02:00
parent a6021b1767
commit c6a9c6a219
Signed by: b12f
GPG key ID: 729956E1124F8F26

View file

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