58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{
|
|
config,
|
|
host,
|
|
inputs,
|
|
pkgs,
|
|
profile,
|
|
username,
|
|
...
|
|
}:
|
|
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;
|
|
initialPassword = "changeme";
|
|
extraGroups = [
|
|
"networkmanager"
|
|
"wheel"
|
|
];
|
|
shell = pkgs.${shellCfg.defaultShell};
|
|
ignoreShellProgramCheck = true;
|
|
packages = with pkgs; [
|
|
direnv
|
|
fzf
|
|
];
|
|
};
|
|
|
|
# Set /etc/shells so GDM will show our user when ZSH is selected
|
|
environment.shells = [ pkgs.${shellCfg.defaultShell} ];
|
|
|
|
nix.settings.allowed-users = [ "${username}" ];
|
|
}
|