infra/logins/default.nix
b12f eb63779bb6
All checks were successful
Flake checks / Check (pull_request) Successful in 28m11s
auth: use all sshPubKeys for disk unlock, fix tests, fix hm config
2024-11-20 16:49:39 +01:00

23 lines
685 B
Nix

{ lib, ... }:
let
admins = import ./admins.nix;
robots = import ./robots.nix;
in
{
flake = {
logins = {
admins = admins;
wireguardDevices = lib.lists.foldl (
wireguardDevices: adminConfig:
wireguardDevices ++ (if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else [ ])
) [ ] (lib.attrsets.attrValues admins);
sshPubKeys = lib.lists.foldl (
sshPubKeys: adminConfig:
sshPubKeys
++ (if adminConfig ? "sshPubKeys" then lib.attrsets.attrValues adminConfig.sshPubKeys else [ ])
) [ ] (lib.attrsets.attrValues admins);
robots.sshPubKeys = lib.attrsets.attrValues robots;
};
};
}