config.nix/modules/user/default.nix
2026-04-01 16:00:52 +02:00

51 lines
888 B
Nix

{
config,
pkgs,
inputs,
lib,
...
}:
{
options = {
user = {
userName = lib.mkOption {
default = "marty";
description = ''
main user name
'';
};
email = lib.mkOption {
default = "${config.user.userName}@${config.domain}";
description = "main user email"
}
shell = lib.mkOption {
default = pkgs.fish;
description = ''
main user shell
'';
};
};
};
config = {
users.users.${config.user.userName} = {
isNormalUser = true;
description = "${config.user.userName}";
extraGroups = [
"networkmanager"
"wheel"
"video"
"audio"
"render"
"docker"
];
shell = config.user.shell;
};
security.sudo = {
enable = true;
wheelNeedsPassword = true;
};
};
}