diff --git a/home/default.nix b/home/default.nix new file mode 100644 index 00000000..0f2b5b3d --- /dev/null +++ b/home/default.nix @@ -0,0 +1,4 @@ +{...}: { + user = [ + ]; +} diff --git a/system/default.nix b/system/default.nix index 00cc417f..a5971631 100644 --- a/system/default.nix +++ b/system/default.nix @@ -8,8 +8,9 @@ ./bluetooth.nix ./btrfs.nix ./fonts.nix - # ./nix.nix - # ./steam.nix + ./nix.nix + ./users.nix + ./steam.nix ]; system.stateVersion = "24.11"; diff --git a/system/persistence.nix b/system/persistence.nix index 5599df8d..4fc2c375 100644 --- a/system/persistence.nix +++ b/system/persistence.nix @@ -3,7 +3,6 @@ hideMounts = true; directories = [ "/etc/NetworkManager/system-connections" - "/var/lib/bluetooth" "/var/lib/systemd/coredump" "/var/lib/bluetooth" ]; diff --git a/system/users.nix b/system/users.nix new file mode 100644 index 00000000..9972ad11 --- /dev/null +++ b/system/users.nix @@ -0,0 +1,30 @@ +{ + conf, + config, + ... +}: { + users.mutableUsers = false; + users.users = { + ${conf.user} = { + isNormalUser = true; + uid = conf.uid; + extraGroups = ["wheel" "networkmanager"]; + hashedPasswordFile = config.sops.secrets."user/hashedPassword".path; + }; + }; + + home-manager.users = let + hm = import ../home; + in { + ${conf.user} = { + imports = hm.user; + home.username = conf.user; + home.homeDirectory = conf.home; + }; + }; + + sops.secrets."user/password" = { + sopsFile = ../hosts/${conf.hostname}/secrets/default.yml; + neededForUsers = true; + }; +}