This commit is contained in:
Domen Kožar 2019-10-02 16:34:58 +02:00
parent 645ab54feb
commit 7f8f39bf55
No known key found for this signature in database
GPG Key ID: C2FFBCAFD2C24246

View File

@ -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]);