chore: removed other users and systems

This commit is contained in:
Nick 2025-06-26 02:15:04 -05:00
parent 2b4ad99e25
commit 233cab07dd
135 changed files with 216 additions and 2462 deletions

View file

@ -4,55 +4,38 @@
...
}:
let
inherit (flake.config.people)
user0
user1
user2
user3
;
inherit (flake.config.machines)
devices
;
inherit (flake.config.people) user0 user1;
inherit (flake.config.machines) devices;
hostname = config.networking.hostName;
mars = devices.mars.name;
deimos = devices.deimos.name;
ceres = devices.ceres.name;
venus = devices.venus.name;
charon = devices.charon.name;
# Helper function to get SSH keys for a specific user
getUserKeys = user: flake.config.people.users.${user}.sshKeys;
user0Key = {
${user0} = {
openssh.authorizedKeys.keys = getUserKeys user0;
};
};
user1Key = {
${user1} = {
openssh.authorizedKeys.keys = getUserKeys user1;
};
};
in
{
users.users =
if hostname == charon then
{ }
else if hostname == mars then
{
${user0} = {
openssh.authorizedKeys.keys = getUserKeys user0;
};
${user3} = {
openssh.authorizedKeys.keys = getUserKeys user3;
};
}
if hostname == mars then
user0Key // user1Key
else if
builtins.elem hostname [
deimos
ceres
]
then
{
${user0} = {
openssh.authorizedKeys.keys = getUserKeys user0;
};
}
else if hostname == venus then
{
${user2} = {
openssh.authorizedKeys.keys = getUserKeys user2;
};
}
user0Key
else
{ };
}