nixos/modules/nixos/user.nix

30 lines
529 B
Nix

{
config,
pkgs,
username,
...
}:
let
shellCfg = config.modules.shell;
in
{
users.mutableUsers = true;
users.users.${username} = {
isNormalUser = true;
initialPassword = "changeme";
extraGroups = [
"networkmanager"
"video"
"wheel"
];
shell = pkgs.${shellCfg.defaultShell};
ignoreShellProgramCheck = true;
packages = with pkgs; [
];
};
# Set /etc/shells so GDM will show our user when ZSH is selected
environment.shells = [ pkgs.${shellCfg.defaultShell} ];
}