diff --git a/modules/system/nix/module.nix b/modules/system/nix/module.nix index 8bae420..80e2b4c 100644 --- a/modules/system/nix/module.nix +++ b/modules/system/nix/module.nix @@ -51,6 +51,9 @@ in { dates = ["21:00"]; }; + # NOTE: + # Writes the settings to /etc/nix/nix.conf. + # See `man nix.conf` for more detailed descriptions of these settings. settings = { # Tell nix to use the xdg spec for base directories # while transitioning, any state must be carried over @@ -69,7 +72,14 @@ in { # Let the system decide the number of max jobs # based on available system specs. Usually this is # the same as the number of cores your CPU has. - max-jobs = 2; + max-jobs = "auto"; + + # This option defines the maximum number of concurrent tasks during one build. + # It affects, e.g., -j option for make. The special value 0 means that the builder + # should use all available CPU cores in the system. Some builds may become + # non-deterministic with this option; use with care! + # Packages will only be affected if enableParallelBuilding is set for them. + cores = 0; # If set, Nix will perform builds in a sandboxed environment # that it will set up automatically for each build.