-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.nix
45 lines (45 loc) · 1005 Bytes
/
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
{
lib,
config,
username,
fullname,
pkgs,
...
}:
let
cfg = config.users;
in
{
options = {
users = {
enable = lib.mkEnableOption "Enable users in NixOS & home-manager";
};
};
config = lib.mkIf cfg.enable {
users = {
defaultUserShell = pkgs.zsh;
mutableUsers = true;
users = {
"${username}" = {
description = "${fullname}";
isNormalUser = true;
initialHashedPassword = "$y$j9T$B1obD.4xOr/6gJ6FCsu1v/$7axAjbaqRpFR3zGZVbOuCRGUNGJXyRxdavAHIyOdyK.";
extraGroups = [
"audio"
"input"
"networkmanager"
"plugdev"
"realtime"
"uinput"
"video"
"wheel"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN76CGOScFN8M/6oDyry/iP95DF0bTHixmk73fKsRP+f [email protected]"
];
};
};
};
home-manager.users.${username} = { };
};
}