-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.nix
61 lines (55 loc) · 1.38 KB
/
default.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
# https://github.com/MatthewCroughan/nixcfg/blob/d577d164eadc777b91db423e59b4ae8b26853fc6/users/default.nix
{ config, lib, pkgs, pkgs-stable, ... }:
let
cfg = config.my.home-manager;
# TODO: are these sensible
adminGroups = [
"wheel" # Enable ‘sudo’ for the user.
"plugdev" # openrazer requires this
"openrazer"
"docker"
"audio"
# printing
"scanner"
"lp"
];
in
{
options.my.home-manager.enabled-users = with lib; mkOption {
type = with types; listOf str;
description = "List of users to include home manager configs for";
default = [ ];
};
config = lib.mkMerge [
{
home-manager = {
extraSpecialArgs = { inherit pkgs-stable; };
};
}
(lib.mkIf (builtins.elem "lun" cfg.enabled-users) {
home-manager.users = {
lun = ./lun;
};
users.users.lun = {
isNormalUser = true;
shell = pkgs.fish;
# Change after install
initialPassword = "nix-placeholder";
# TODO: are these sensible
extraGroups = adminGroups;
};
})
(lib.mkIf (builtins.elem "mmk" cfg.enabled-users) {
home-manager.users = {
mmk = ./mmk;
};
users.users.mmk = {
isNormalUser = true;
shell = pkgs.fish;
# Change after install
initialPassword = "nix-placeholder";
extraGroups = adminGroups;
};
})
];
}