refactor: cleaned up nixos dir

This commit is contained in:
Nick 2025-02-05 20:15:36 -06:00
parent 89814be57c
commit 2000adb56a
77 changed files with 422 additions and 464 deletions

View file

@ -0,0 +1,44 @@
{
flake,
config,
...
}:
let
inherit (flake.config.people)
user0
user1
user2
;
inherit (flake.config.people.users.${userLogic})
sshKeys
;
inherit (flake.config.machines)
devices
;
hostname = config.networking.hostName;
desktop = devices.desktop.name;
server = devices.server.name;
fallaryn = devices.fallaryn.name;
bartholomew = devices.bartholomew.name;
userLogic =
if hostname == desktop then
user0
else if hostname == server then
user0
else if hostname == fallaryn then
user2
else
"";
in
{
users.users =
if hostname == bartholomew then
{ }
else
{
${userLogic} = {
openssh.authorizedKeys.keys = sshKeys;
};
};
}