{ config, host, inputs, pkgs, profile, username, ... }: let shellCfg = config.modules.shell; 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 = [ ../../homes/${username}/home.nix ]; }; }; users.mutableUsers = true; users.users.${username} = { isNormalUser = true; initialPassword = "changeme"; extraGroups = [ "networkmanager" "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} ]; # Needed to get completion for system packages (e.g. systemd) environment.pathsToLink = [ ] ++ (if zshCfg.enable then [ "/share/zsh" ] else [ ]); }