diff --git a/flake.nix b/flake.nix index f421b00..5b75ca8 100644 --- a/flake.nix +++ b/flake.nix @@ -96,12 +96,7 @@ inherit system; pkgs = pkgs; modules = [ - { - nix.settings.experimental-features = "nix-command flakes"; - environment.systemPackages = with pkgs; [ - vim - ]; - } + ./nix/system/common/nix.nix ./nix/system/local.nix ] ++ extraModules; diff --git a/nix/system/common/nix.nix b/nix/system/common/nix.nix new file mode 100644 index 0000000..605ade6 --- /dev/null +++ b/nix/system/common/nix.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + vim + ]; + + nix = { + settings = { + experimental-features = "nix-command flakes"; + auto-optimise-store = true; + max-jobs = "auto"; + cores = 0; + + builders-use-substitutes = true; + }; + + extraOptions = '' + keep-going = true + ''; + + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }; +} diff --git a/nix/system/linux.nix b/nix/system/linux.nix index 78d96ee..d5a23f3 100644 --- a/nix/system/linux.nix +++ b/nix/system/linux.nix @@ -37,17 +37,6 @@ }; }; - nix = { - settings = { - auto-optimise-store = true; - }; - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - }; - services = { pipewire = { enable = true;