{ config, hashedPassword, host, inputs, lib, pkgs, profile, username, ... }: with lib; let zshCfg = config.modules.zsh; 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; hashedPassword = "${hashedPassword}"; extraGroups = [ "wheel" ]; shell = mkMerge [ (mkIf (zshCfg.enable && zshCfg.defaultShell) pkgs.zsh) (mkIf (!zshCfg.enable || !zshCfg.defaultShell) pkgs.bash) ]; ignoreShellProgramCheck = true; }; nix.settings.allowed-users = [ "${username}" ]; }