-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathuser.nix
More file actions
27 lines (26 loc) · 778 Bytes
/
user.nix
File metadata and controls
27 lines (26 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ pkgs, inputs, username, host, ...}:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs username host; };
users.${username} = {
imports =
if (host == "desktop") then
[ ./../home/default.desktop.nix ]
else [ ./../home ];
home.username = "${username}";
home.homeDirectory = "/home/${username}";
home.stateVersion = "24.05";
programs.home-manager.enable = true;
};
};
users.users.${username} = {
isNormalUser = true;
description = "${username}";
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.zsh;
};
nix.settings.allowed-users = [ "${username}" ];
}