diff --git a/hosts/zroux/default.nix b/hosts/zroux-mac/hardware-configuration.nix similarity index 100% rename from hosts/zroux/default.nix rename to hosts/zroux-mac/hardware-configuration.nix diff --git a/lib/mksystem.nix b/lib/mksystem.nix index caa6c6c..a6cb3d5 100644 --- a/lib/mksystem.nix +++ b/lib/mksystem.nix @@ -13,7 +13,7 @@ }: let systemFunc = if darwin - then inputs.darwin.lib.darwinSystem + then inputs.nix-darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem; home-manager = if darwin @@ -37,16 +37,12 @@ in ({pkgs, ...}: { networking.hostName = hostname; - users.users.root.hashedPassword = builtins.readFile ../password/root; users.users.${user} = { home = if darwin then "/Users/${user}" else "/home/${user}"; - hashedPassword = builtins.readFile ../password/${user}; - isNormalUser = true; - extraGroups = ["wheel" "input" "docker" "audio" "mlocate" "libvirtd"]; shell = pkgs.zsh; openssh.authorizedKeys.keys = [ @@ -57,6 +53,18 @@ in ]; }; }) + ( + if (!darwin) + then { + users.users.root.hashedPassword = builtins.readFile ../password/root; + users.users.${user} = { + isNormalUser = true; + hashedPassword = builtins.readFile ../password/${user}; + extraGroups = ["wheel" "input" "docker" "audio" "mlocate" "libvirtd"]; + }; + } + else {} + ) ../hosts/${hostname}/hardware-configuration.nix home-manager.home-manager diff --git a/modules/cli/nix.nix b/modules/cli/nix.nix index f6120e0..a336594 100644 --- a/modules/cli/nix.nix +++ b/modules/cli/nix.nix @@ -14,8 +14,8 @@ # Making legacy nix commands consistent as well, awesome! nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; + optimise.automatic = true; settings = { - auto-optimise-store = true; warn-dirty = false; experimental-features = ["nix-command" "flakes"]; use-xdg-base-directories = true;