Co-authored-by: mjallen18 <matt.l.jallen@gmail.com>
Reviewed-on: #3
This commit is contained in:
2025-12-01 17:26:26 -06:00
parent 672221f471
commit f172707b15
48 changed files with 851 additions and 1321 deletions

View File

@@ -69,51 +69,58 @@ in
users = {
mutableUsers = cfg.mutableUsers;
groups.${cfg.group}.gid = lib.mkForce (if cfg.group != "wheel" then cfg.gid else 1);
users.${cfg.name} = {
inherit (cfg)
name
uid
linger
packages
password
hashedPassword
hashedPasswordFile
;
users = {
root = {
isSystemUser = true;
isNormalUser = false;
shell = lib.mkForce pkgs.zsh;
};
${cfg.name} = {
inherit (cfg)
name
uid
linger
packages
password
hashedPassword
hashedPasswordFile
;
extraGroups = [
"wheel"
"keys"
"networkmanager"
"ratbagd"
"scanner"
"systemd-journal"
"mpd"
"audio"
"video"
"input"
"plugdev"
"lp"
"tss"
"power"
"nix"
"i2c"
"media"
"nscd"
"avahi"
"podman"
"libvirtd"
]
++ cfg.extraGroups;
extraGroups = [
"wheel"
"keys"
"networkmanager"
"ratbagd"
"scanner"
"systemd-journal"
"mpd"
"audio"
"video"
"input"
"plugdev"
"lp"
"tss"
"power"
"nix"
"i2c"
"media"
"nscd"
"avahi"
"podman"
"libvirtd"
]
++ cfg.extraGroups;
group = cfg.group;
home = "/home/${cfg.name}";
isNormalUser = true;
shell = lib.mkForce pkgs.zsh;
group = cfg.group;
home = "/home/${cfg.name}";
isNormalUser = true;
shell = lib.mkForce pkgs.zsh;
# SSH keys - combine user-specific and common keys
openssh.authorizedKeys.keys = cfg.sshKeys ++ (lib.optionals cfg.enableCommonSshKeys commonSshKeys);
}
// cfg.extraOptions;
# SSH keys - combine user-specific and common keys
openssh.authorizedKeys.keys = cfg.sshKeys ++ (lib.optionals cfg.enableCommonSshKeys commonSshKeys);
}
// cfg.extraOptions;
};
};
assertions = [
{