nix-configs/modules/system/user.nix
2025-07-29 03:02:25 +02:00

40 lines
658 B
Nix

{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.system.user;
in
{
options.xyno.system.user.enable = lib.mkEnableOption "enable a user with xynos config";
options.xyno.system.user.name = lib.mkOption {
type = lib.types.str;
default = "xyno";
};
config = lib.mkIf cfg.enable {
environment.homeBinInPath = true;
users.users.${cfg.name} = {
isNormalUser = true;
uid = 1000;
extraGroups = [
"wheel"
"cdrom"
"networkmanager"
"video"
"netdev"
"plugdev"
"dialout"
"tape"
"uucp"
"wireshark"
"lock"
];
};
};
}