From 7db45cf96d836917ab828dad8068e9f8a6f343a8 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 4 May 2025 21:53:34 +0200 Subject: [PATCH] Cleanup darwin/linux split in mksystem --- lib/mksystem.nix | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/lib/mksystem.nix b/lib/mksystem.nix index 78765b1..aa33ff2 100644 --- a/lib/mksystem.nix +++ b/lib/mksystem.nix @@ -54,24 +54,8 @@ 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"]; - }; - networking.nameservers = ["1.1.1.1" "9.9.9.9"]; - networking.resolvconf.extraConfig = "name_servers=\"1.1.1.1 9.9.9.9\""; - } - else {} - ) ../hosts/${hostname}/hardware-configuration.nix - inputs.nix-index-database.nixosModules.nix-index - home-manager.home-manager { home-manager = { @@ -89,6 +73,20 @@ in }; } ] + ++ nixpkgs.lib.optionals (!darwin) + [ + inputs.nix-index-database.nixosModules.nix-index + { + 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"]; + }; + networking.nameservers = ["1.1.1.1" "9.9.9.9"]; + networking.resolvconf.extraConfig = "name_servers=\"1.1.1.1 9.9.9.9\""; + } + ] ++ nixpkgs.lib.optionals wsl [ inputs.nixos-wsl.nixosModules.wsl ({pkgs, ...}: {