[Nix-dev] Override nix.maxJobs without editing hardware-configuration.nix?

James Cook james.cook at utoronto.ca
Thu Feb 19 06:39:56 CET 2015


maxJobs = pkgs.lib.mkForce 4; worked. Thanks all! I have a lot to
learn about NixOS configuration.

On 18 February 2015 at 02:25, Eelco Dolstra <eelco.dolstra at logicblox.com> wrote:
> Hi,
>
> On 18/02/15 08:25, James Cook wrote:
>
>> I can't set nix.maxJobs in configuration.nix, because it is set in
>> hardware-configuration.nix:
>>
>> error: The unique option `nix.maxJobs' is defined multiple times, in
>> `/etc/nixos/hardware-configuration.nix' and
>> `/etc/nixos/configuration.nix'.
>>
>> Of course, I could work around this by editing
>> hardware-configuration.nix, but then the change would be lost the next
>> time I run nixos-generate-config. Is there a better way to do this?
>
> This should work:
>
>   nix.maxJobs = mkForce 4;
>
> I guess the option definition in hardware-configuration.nix should be given a
> lower priority to prevent this problem.
>
> --
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list