feat: added user2 and refactored to accommodate

This commit is contained in:
Nick 2025-01-28 22:21:31 -06:00
parent 9cdcf4fec4
commit 04d561de0c
48 changed files with 133 additions and 338 deletions

View file

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