infra/logins/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
685 B
Nix
Raw Permalink Normal View History

2024-04-03 18:54:40 +00:00
{ lib, ... }:
let
admins = import ./admins.nix;
robots = import ./robots.nix;
in
{
flake = {
logins = {
admins = admins;
2024-11-12 19:30:03 +00:00
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);
2024-04-03 18:54:40 +00:00
robots.sshPubKeys = lib.attrsets.attrValues robots;
};
};
}