48 lines
1.0 KiB
Nix
48 lines
1.0 KiB
Nix
{
|
|
config,
|
|
host,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
profile,
|
|
username,
|
|
...
|
|
}:
|
|
with lib;
|
|
let
|
|
shellCfg = config.modules.shell;
|
|
in
|
|
{
|
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
|
home-manager = {
|
|
useUserPackages = true;
|
|
useGlobalPkgs = false;
|
|
backupFileExtension = "backup";
|
|
extraSpecialArgs = { inherit host inputs profile username; };
|
|
users.${username} = {
|
|
imports = [ ./../home ];
|
|
home = {
|
|
username = "${username}";
|
|
homeDirectory = "/home/${username}";
|
|
stateVersion = "25.05";
|
|
};
|
|
};
|
|
};
|
|
|
|
users.mutableUsers = true;
|
|
users.users.${username} = {
|
|
isNormalUser = true;
|
|
intialPassword = "changeme";
|
|
extraGroups = [
|
|
"networkmanager"
|
|
"wheel"
|
|
];
|
|
shell = pkgs.${shellCfg.defaultShell};
|
|
ignoreShellProgramCheck = true;
|
|
};
|
|
|
|
# Set /etc/shells so GDM will show our user when ZSH is selected
|
|
environment.shells = with pkgs; [ pkgs.${shellCfg.defaultShell} ];
|
|
|
|
nix.settings.allowed-users = [ "${username}" ];
|
|
} |