-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathusers.nix
More file actions
41 lines (38 loc) · 1002 Bytes
/
users.nix
File metadata and controls
41 lines (38 loc) · 1002 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
config,
pkgs,
lib,
...
}: {
# Set up immutable users
users = {
mutableUsers = false;
users.root = {
shell = pkgs.fish;
hashedPassword = "$6$4dxSa3uVxuwa$2pkshyXLslXxhuZCMZVmrknXsrd4k5DTrJgoL4izv6U/XQJ6iM2asqX.L6chpmEiBlhJC1F1P7Pw/3RZX/VMN0";
};
users.alex = {
shell = pkgs.fish;
isNormalUser = true;
home = "/home/alex";
extraGroups = ["wheel" "networkmanager" "video" "audio" "adbusers"];
uid = 1000;
hashedPassword = "$6$lY0U5C4WoOcmj.6$YLKJMkQVUJDbItcyHV7wZuvmzpvmOcPR9dgHWJYzUHBB7bSevyC4Vqpqm2IxoVqqhpz.KY7aQJnQI2HaSDsL1.";
};
};
services.getty.autologinUser = "alex";
security.sudo = {
enable = true;
extraConfig = "Defaults pwfeedback";
};
programs.fish = lib.mkIf (config.machine != "wsl") {
loginShellInit = ''
if not set -q SWAYSTARTED
if not set -q DISPLAY && test (tty) = /dev/tty1
set -g SWAYSTARTED 1
exec sway
end
end
'';
};
}