-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusers.nix
100 lines (97 loc) · 3.15 KB
/
users.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{ config, pkgs, ... }:
let
share_users = [
rec {
name = "sirj";
config = {
initialHashedPassword = "$6$j2o3IhM0GDulXWxi$P4WKsNfgK/OCQKgkZon47Rvx0ocit2JinbCDYb6IeQEwm6PlqypV8qxDB5F1NlETd0lulIWdRR9/ZHYzsyZ9T.";
extraGroups = [ "frontier" "wilds" "apps" "media" ];
home="/frontier/${name}";
isNormalUser = true;
isSystemUser = false;
};
}
rec {
name = "pengu";
config = {
initialHashedPassword = "$6$j2o3IhM0GDulXWxi$P4WKsNfgK/OCQKgkZon47Rvx0ocit2JinbCDYb6IeQEwm6PlqypV8qxDB5F1NlETd0lulIWdRR9/ZHYzsyZ9T.";
extraGroups = [ "frontier" "wilds" "apps" "media" ];
home="/frontier/${name}";
isNormalUser = true;
isSystemUser = false;
};
}
rec {
name = "hik";
config = {
initialHashedPassword = "$6$j2o3IhM0GDulXWxi$P4WKsNfgK/OCQKgkZon47Rvx0ocit2JinbCDYb6IeQEwm6PlqypV8qxDB5F1NlETd0lulIWdRR9/ZHYzsyZ9T.";
extraGroups = [ "frontier" "wilds" "apps" "media" "wheel" ];
home="/frontier/${name}";
isNormalUser = true;
isSystemUser = false;
};
}
rec {
name = "lux";
config = {
initialHashedPassword = "$6$j2o3IhM0GDulXWxi$P4WKsNfgK/OCQKgkZon47Rvx0ocit2JinbCDYb6IeQEwm6PlqypV8qxDB5F1NlETd0lulIWdRR9/ZHYzsyZ9T.";
extraGroups = [ "wilds" "media" ];
home = "/wilds/${name}";
isNormalUser = true;
isSystemUser = false;
};
}
rec {
name = "norn";
config = {
initialHashedPassword = "$6$j2o3IhM0GDulXWxi$P4WKsNfgK/OCQKgkZon47Rvx0ocit2JinbCDYb6IeQEwm6PlqypV8qxDB5F1NlETd0lulIWdRR9/ZHYzsyZ9T.";
extraGroups = [ "wilds" "media" ];
home = "/wilds/${name}";
isNormalUser = true;
isSystemUser = false;
};
}
rec {
name = "vox";
config = {
initialHashedPassword = "$6$j2o3IhM0GDulXWxi$P4WKsNfgK/OCQKgkZon47Rvx0ocit2JinbCDYb6IeQEwm6PlqypV8qxDB5F1NlETd0lulIWdRR9/ZHYzsyZ9T.";
extraGroups = [ "wilds" "media" ];
home = "/wilds/${name}";
isNormalUser = true;
isSystemUser = false;
};
}
rec {
name = "ranka";
config = {
initialHashedPassword = "$6$j2o3IhM0GDulXWxi$P4WKsNfgK/OCQKgkZon47Rvx0ocit2JinbCDYb6IeQEwm6PlqypV8qxDB5F1NlETd0lulIWdRR9/ZHYzsyZ9T.";
extraGroups = [ "frontier" "wilds" "apps" "media" "wheel" ];
isNormalUser = true;
isSystemUser = false;
home = "/home/ranka";
group = "ranka";
};
}
];
groups = [
{ name = "media"; }
{ name = "apps"; }
{ name = "ranka"; }
{ name = "frontier"; }
{ name = "wilds"; }
];
in
{
users.mutableUsers = true;
users.groups = builtins.listToAttrs (map (group: { name = group.name; value = {}; }) groups);
users.users = builtins.listToAttrs (map
(user: {
name = user.name;
value = {
initialHashedPassword = user.config.initialHashedPassword;
isNormalUser = user.config.isNormalUser;
isSystemUser = user.config.isSystemUser; shell = pkgs.bash; home= if user.config ? "home" then user.config.home else "/wilds/${user.name}";
group = if user.config ? "group" then user.config.group else "users";
};
}) share_users);
}