infra/logins/default.nix
Benjamin Yule Bädorf c6a9c6a219
All checks were successful
Flake checks / Check (pull_request) Successful in 7m4s
logins: check for missing wireguard device attribute
2024-04-03 21:18:02 +02:00

15 lines
472 B
Nix

{ lib, ... }: let
admins = import ./admins.nix;
robots = import ./robots.nix;
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);
robots.sshPubKeys = lib.attrsets.attrValues robots;
};
};
}