diff --git a/lib/main.js b/lib/main.js index cd5855e..bda2e4e 100644 --- a/lib/main.js +++ b/lib/main.js @@ -24,11 +24,13 @@ const fs_1 = require("fs"); function run() { return __awaiter(this, void 0, void 0, function* () { try { - // rest of the constants const home = os_1.homedir(); const { username } = os_1.userInfo(); const PATH = process.env.PATH; 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"]); // 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]);