Merge pull request #3 from DeterminateSystems/fallback-true

Enable fallback=true by default
This commit is contained in:
Graham Christensen 2023-06-26 13:49:37 -04:00 committed by GitHub
commit 9ef8b76894
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

1
dist/index.js generated vendored
View file

@ -12194,6 +12194,7 @@ async function setUpAutoCache() {
await fs$2.mkdir(`${process.env["HOME"]}/.config/nix`, { recursive: true }); await fs$2.mkdir(`${process.env["HOME"]}/.config/nix`, { recursive: true });
const nixConf = openSync(`${process.env["HOME"]}/.config/nix/nix.conf`, 'a'); const nixConf = openSync(`${process.env["HOME"]}/.config/nix/nix.conf`, 'a');
writeSync(nixConf, `${"\n"}extra-substituters = http://${coreExports.getInput('listen')}/?trusted=1&compression=zstd&parallel-compression=true${"\n"}`); writeSync(nixConf, `${"\n"}extra-substituters = http://${coreExports.getInput('listen')}/?trusted=1&compression=zstd&parallel-compression=true${"\n"}`);
writeSync(nixConf, `fallback = true${"\n"}`);
close(nixConf); close(nixConf);
coreExports.debug('Launched Magic Nix Cache'); coreExports.debug('Launched Magic Nix Cache');
coreExports.exportVariable(ENV_CACHE_DAEMONDIR, daemonDir); coreExports.exportVariable(ENV_CACHE_DAEMONDIR, daemonDir);

View file

@ -127,6 +127,7 @@ async function setUpAutoCache() {
await fs.mkdir(`${process.env["HOME"]}/.config/nix`, { recursive: true }); await fs.mkdir(`${process.env["HOME"]}/.config/nix`, { recursive: true });
const nixConf = openSync(`${process.env["HOME"]}/.config/nix/nix.conf`, 'a'); const nixConf = openSync(`${process.env["HOME"]}/.config/nix/nix.conf`, 'a');
writeSync(nixConf, `${"\n"}extra-substituters = http://${core.getInput('listen')}/?trusted=1&compression=zstd&parallel-compression=true${"\n"}`); writeSync(nixConf, `${"\n"}extra-substituters = http://${core.getInput('listen')}/?trusted=1&compression=zstd&parallel-compression=true${"\n"}`);
writeSync(nixConf, `fallback = true${"\n"}`);
close(nixConf); close(nixConf);
core.debug('Launched Magic Nix Cache'); core.debug('Launched Magic Nix Cache');