blob: 5944248c4f01d3ef967430c65e50e2054cdae462 [file] [log] [blame]
Skyler Grey252927a2022-10-18 22:18:15 +01001{ pkgs
2, config
3, username
4, ...
Skyler Greybcb2cb72022-08-21 07:24:35 +01005}: {
6 config = {
7 users.mutableUsers = false;
Skyler Grey6aa7c262022-08-20 22:22:03 +01008
Skyler Greybcb2cb72022-08-21 07:24:35 +01009 users.users.${username} = {
10 isNormalUser = true;
Skyler Grey9316a0a2022-10-31 00:36:30 +000011 extraGroups = [ "netdev" "wheel" "kvm" "docker" "containerd" "dialout" "libvirtd" "video" "tty" config.users.groups.keys.name ];
Skyler Greybcb2cb72022-08-21 07:24:35 +010012 shell = pkgs.zsh;
Skyler Grey7bd7cb22022-09-01 23:41:57 +010013 passwordFile = config.sops.secrets.password.path;
Skyler Greybcb2cb72022-08-21 07:24:35 +010014 };
Skyler Greydbc5ac72022-09-09 08:17:02 +010015 users.users.root = {
16 passwordFile = config.sops.secrets.password.path;
17 # Important for physlock + sleep
18 };
Skyler Greybcb2cb72022-08-21 07:24:35 +010019
Skyler Grey9316a0a2022-10-31 00:36:30 +000020 environment.persistence."/nix/persist".users.${username}.directories = [ "Documents" "Pictures" ];
21 environment.persistence."/large/persist".users.${username}.directories = [ "Code" ];
Skyler Grey7bd7cb22022-09-01 23:41:57 +010022 sops.secrets.password = {
23 mode = "0400";
24 neededForUsers = true;
25 };
Skyler Greybcb2cb72022-08-21 07:24:35 +010026 };
Skyler Grey6aa7c262022-08-20 22:22:03 +010027}