Skip to content

Commit

Permalink
fix #5: set max-jobs = auto
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Oct 3, 2019
1 parent 67bd092 commit ba979b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ function run() {
const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt';
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
yield exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]);
yield exec.exec("sudo", ["echo", "http2 = false", ">>", "/etc/nix/nix.conf"]);
yield exec.exec("sudo", ["sh", "-c", "echo http2 = false >> /etc/nix/nix.conf"]);
// Set jobs to number of cores
yield exec.exec("sudo", ["sh", "-c", "echo max-jobs = auto >> /etc/nix/nix.conf"]);
// TODO: retry due to all the things that go wrong
const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install');
yield exec.exec("sh", [nixInstall]);
Expand Down
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ async function run() {

// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
await exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]);
await exec.exec("sudo", ["echo", "http2 = false", ">>", "/etc/nix/nix.conf"]);
await exec.exec("sudo", ["sh", "-c", "echo http2 = false >> /etc/nix/nix.conf"]);

// Set jobs to number of cores
await exec.exec("sudo", ["sh", "-c", "echo max-jobs = auto >> /etc/nix/nix.conf"]);

// TODO: retry due to all the things that go wrong
const nixInstall = await tc.downloadTool('https://nixos.org/nix/install');
Expand Down

0 comments on commit ba979b5

Please sign in to comment.