-
Notifications
You must be signed in to change notification settings - Fork 45
/
user.nix
39 lines (38 loc) · 822 Bytes
/
user.nix
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
28
29
30
31
32
33
34
35
36
37
38
39
{
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}" ];
}