diff --git a/flake.nix b/flake.nix index 88b90ce..5abd142 100644 --- a/flake.nix +++ b/flake.nix @@ -37,8 +37,8 @@ hostname = "sephiroth"; }; modules = [ - ./modules/common/nix-core.nix - ./modules/common/host-users.nix + ./modules/common/core.nix + ./modules/common/users.nix ./modules/machine/sephiroth/configuration.nix ./modules/machine/sephiroth/apps.nix @@ -62,8 +62,8 @@ modules = [ nix-flatpak.nixosModules.nix-flatpak nix-ld.nixosModules.nix-ld - ./modules/common/nix-core.nix - ./modules/common/host-users.nix + ./modules/common/core.nix + ./modules/common/users.nix ./modules/machine/cloud/hardware-configuration.nix ./modules/machine/cloud/configuration.nix diff --git a/modules/common/nix-core.nix b/modules/common/core.nix similarity index 70% rename from modules/common/nix-core.nix rename to modules/common/core.nix index 7cf35df..1bd62c9 100644 --- a/modules/common/nix-core.nix +++ b/modules/common/core.nix @@ -9,13 +9,6 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; - # Auto upgrade nix package and the daemon service. - # services.nix-daemon.enable = true; - # Use this instead of services.nix-daemon.enable if you - # don't wan't the daemon service to be managed for you. - # nix.useDaemon = true; - services.nix-daemon.enable = true; - nix.package = pkgs.nix; # do garbage collection weekly to keep disk usage low diff --git a/modules/common/host-users.nix b/modules/common/users.nix similarity index 66% rename from modules/common/host-users.nix rename to modules/common/users.nix index 4d8d4df..d8185d8 100644 --- a/modules/common/host-users.nix +++ b/modules/common/users.nix @@ -1,4 +1,5 @@ { + lib, pkgs, userName, hostname, @@ -15,13 +16,21 @@ # Set up user accounts # Don't forget to set a password with ‘passwd’! - users.users."${userName}" = { - home = - if pkgs.stdenv.isDarwin - then "/Users/${userName}" - else "/home/${userName}"; - description = userName; - }; + users.users."${userName}" = lib.mkMerge [ + { + home = + if pkgs.stdenv.isDarwin + then "/Users/${userName}" + else "/home/${userName}"; + description = userName; + } + + (lib.mkIf (pkgs.stdenv.isLinux) { + group = "${userName}"; + isNormalUser = true; + }) + ]; + users.groups.wyatt = {}; nix.settings.trusted-users = [userName]; diff --git a/modules/machine/cloud/configuration.nix b/modules/machine/cloud/configuration.nix index dd59431..e9df964 100644 --- a/modules/machine/cloud/configuration.nix +++ b/modules/machine/cloud/configuration.nix @@ -200,10 +200,10 @@ arguments = "-v -o pw"; }; - users.users."${userName}" = { - group = "${userName}"; - isNormalUser = true; - }; + # users.users."${userName}" = { + # group = "${userName}"; + # isNormalUser = true; + # }; system.stateVersion = "24.05"; } diff --git a/modules/machine/sephiroth/configuration.nix b/modules/machine/sephiroth/configuration.nix index ec82bb5..f2adfad 100644 --- a/modules/machine/sephiroth/configuration.nix +++ b/modules/machine/sephiroth/configuration.nix @@ -168,6 +168,12 @@ pkgs.bash ]; + # Auto upgrade nix package and the daemon service. + # services.nix-daemon.enable = true; + # Use this instead of services.nix-daemon.enable if you + # don't wan't the daemon service to be managed for you. + services.nix-daemon.enable = true; + system.stateVersion = 5; # Set your time zone.