mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-21 20:58:41 +03:00
* Set build-max-jobs in the Nix configuration file from the NixOS
configuration file. svn path=/nixos/trunk/; revision=8109
This commit is contained in:
parent
935042365c
commit
31d91b4ec1
@ -91,7 +91,9 @@ if test -z "@readOnlyRoot@"; then
|
|||||||
|
|
||||||
mkdir -p /nix/etc/nix
|
mkdir -p /nix/etc/nix
|
||||||
cat > /nix/etc/nix/nix.conf <<EOF
|
cat > /nix/etc/nix/nix.conf <<EOF
|
||||||
|
# WARNING: this file is generated.
|
||||||
build-users-group = nixbld
|
build-users-group = nixbld
|
||||||
|
build-max-jobs = @maxJobs@
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chown root.nixbld /nix/store
|
chown root.nixbld /nix/store
|
||||||
|
@ -663,6 +663,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
name = ["nix" "maxJobs"];
|
||||||
|
default = 1;
|
||||||
|
example = 2;
|
||||||
|
description = "
|
||||||
|
This option defines the maximum number of jobs that Nix will try
|
||||||
|
to build in parallel. The default is 1. You should generally
|
||||||
|
set it to the number of CPUs in your system (e.g., 2 on a Athlon
|
||||||
|
64 X2).
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
name = ["security" "setuidPrograms"];
|
name = ["security" "setuidPrograms"];
|
||||||
default = ["passwd" "su" "crontab" "ping" "ping6"];
|
default = ["passwd" "su" "crontab" "ping" "ping6"];
|
||||||
|
@ -224,13 +224,13 @@ rec {
|
|||||||
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
|
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
|
||||||
hostName = config.get ["networking" "hostName"];
|
hostName = config.get ["networking" "hostName"];
|
||||||
setuidPrograms = config.get ["security" "setuidPrograms"];
|
setuidPrograms = config.get ["security" "setuidPrograms"];
|
||||||
|
maxJobs = config.get ["nix" "maxJobs"];
|
||||||
|
|
||||||
path = [
|
path = [
|
||||||
pkgs.coreutils pkgs.gnugrep pkgs.findutils
|
pkgs.coreutils pkgs.gnugrep pkgs.findutils
|
||||||
pkgs.glibc # needed for getent
|
pkgs.glibc # needed for getent
|
||||||
pkgs.pwdutils
|
pkgs.pwdutils
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user