forked from pub-solar/infra
style: run nix fmt
This commit is contained in:
parent
5366d07d44
commit
2b72d9a5a8
|
@ -7,11 +7,10 @@ in
|
||||||
flake = {
|
flake = {
|
||||||
logins = {
|
logins = {
|
||||||
admins = admins;
|
admins = admins;
|
||||||
wireguardDevices =
|
wireguardDevices = lib.lists.foldl (
|
||||||
lib.lists.foldl
|
wireguardDevices: adminConfig:
|
||||||
(wireguardDevices: adminConfig: wireguardDevices ++ (if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else [ ]))
|
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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,8 +31,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
users.users = (lib.attrsets.foldlAttrs
|
users.users =
|
||||||
(acc: name: value: acc // { ${name} = {
|
(lib.attrsets.foldlAttrs (
|
||||||
|
acc: name: value:
|
||||||
|
acc
|
||||||
|
// {
|
||||||
|
${name} = {
|
||||||
name = name;
|
name = name;
|
||||||
group = name;
|
group = name;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
@ -42,9 +46,8 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keys = lib.attrsets.attrValues value.sshPubKeys;
|
openssh.authorizedKeys.keys = lib.attrsets.attrValues value.sshPubKeys;
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
{ }
|
) { } flake.self.logins.admins)
|
||||||
flake.self.logins.admins)
|
|
||||||
// {
|
// {
|
||||||
# TODO: Remove when we stop locking ourselves out.
|
# TODO: Remove when we stop locking ourselves out.
|
||||||
root.openssh.authorizedKeys.keys = config.pub-solar-os.authentication.sshPubKeys;
|
root.openssh.authorizedKeys.keys = config.pub-solar-os.authentication.sshPubKeys;
|
||||||
|
@ -62,10 +65,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups = (lib.attrsets.foldlAttrs
|
users.groups =
|
||||||
(acc: name: value: acc // { "${name}" = { }; })
|
(lib.attrsets.foldlAttrs (
|
||||||
{ }
|
acc: name: value:
|
||||||
flake.self.logins.admins)
|
acc // { "${name}" = { }; }
|
||||||
|
) { } flake.self.logins.admins)
|
||||||
// {
|
// {
|
||||||
${config.pub-solar-os.authentication.robot.username} = { };
|
${config.pub-solar-os.authentication.robot.username} = { };
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue