Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 1 | { pkgs |
| 2 | , config |
| 3 | , username |
| 4 | , ... |
Skyler Grey | bcb2cb7 | 2022-08-21 07:24:35 +0100 | [diff] [blame] | 5 | }: { |
| 6 | config = { |
| 7 | users.mutableUsers = false; |
Skyler Grey | 6aa7c26 | 2022-08-20 22:22:03 +0100 | [diff] [blame] | 8 | |
Skyler Grey | bcb2cb7 | 2022-08-21 07:24:35 +0100 | [diff] [blame] | 9 | users.users.${username} = { |
| 10 | isNormalUser = true; |
Skyler Grey | 9316a0a | 2022-10-31 00:36:30 +0000 | [diff] [blame] | 11 | extraGroups = [ "netdev" "wheel" "kvm" "docker" "containerd" "dialout" "libvirtd" "video" "tty" config.users.groups.keys.name ]; |
Skyler Grey | bcb2cb7 | 2022-08-21 07:24:35 +0100 | [diff] [blame] | 12 | shell = pkgs.zsh; |
Skyler Grey | 7bd7cb2 | 2022-09-01 23:41:57 +0100 | [diff] [blame] | 13 | passwordFile = config.sops.secrets.password.path; |
Skyler Grey | bcb2cb7 | 2022-08-21 07:24:35 +0100 | [diff] [blame] | 14 | }; |
Skyler Grey | dbc5ac7 | 2022-09-09 08:17:02 +0100 | [diff] [blame] | 15 | users.users.root = { |
| 16 | passwordFile = config.sops.secrets.password.path; |
| 17 | # Important for physlock + sleep |
| 18 | }; |
Skyler Grey | bcb2cb7 | 2022-08-21 07:24:35 +0100 | [diff] [blame] | 19 | |
Skyler Grey | 088952e | 2023-01-26 00:48:01 +0000 | [diff] [blame] | 20 | environment.persistence."/nix/persist".users.${username}.directories = [ |
| 21 | "Documents" |
| 22 | "Pictures" |
| 23 | ]; |
| 24 | environment.persistence."/large/persist".users.${username}.directories = [ |
| 25 | "Code" |
| 26 | "Programs" |
| 27 | ]; |
Skyler Grey | 7bd7cb2 | 2022-09-01 23:41:57 +0100 | [diff] [blame] | 28 | sops.secrets.password = { |
| 29 | mode = "0400"; |
| 30 | neededForUsers = true; |
| 31 | }; |
Skyler Grey | bcb2cb7 | 2022-08-21 07:24:35 +0100 | [diff] [blame] | 32 | }; |
Skyler Grey | 6aa7c26 | 2022-08-20 22:22:03 +0100 | [diff] [blame] | 33 | } |