nix.conf: enable parallel building (#90)
This is a sensible default given Docker images are often used for CI and build jobs.
This commit is contained in:
parent
074dd32ad1
commit
98e0048215
2 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,7 @@ docker-nixpkgs.nix.override {
|
||||||
text = ''
|
text = ''
|
||||||
accept-flake-config = true
|
accept-flake-config = true
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
|
max-jobs = auto
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
] ++ extraContents;
|
] ++ extraContents;
|
||||||
|
|
|
@ -84,11 +84,12 @@ let
|
||||||
mkdir -p libexec/nix
|
mkdir -p libexec/nix
|
||||||
ln -s /bin/nix libexec/nix/build-remote
|
ln -s /bin/nix libexec/nix/build-remote
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes and parallel building
|
||||||
mkdir -p etc/nix
|
mkdir -p etc/nix
|
||||||
cat <<NIX_CONFIG > etc/nix/nix.conf
|
cat <<NIX_CONFIG > etc/nix/nix.conf
|
||||||
accept-flake-config = true
|
accept-flake-config = true
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
|
max-jobs = auto
|
||||||
NIX_CONFIG
|
NIX_CONFIG
|
||||||
|
|
||||||
# Add run-as-user script
|
# Add run-as-user script
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue