Skip to content

Commit 59c4138

Browse files
authored
Merge pull request #2 from tsirysndr/fix/configure-substituers
fix: configure substituers
2 parents 7fe930d + 1eb9dde commit 59c4138

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

dist/setup.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ export default async () => {
1515
const cacheEnabled = cache.isFeatureAvailable();
1616
let cacheHit = false;
1717
let version;
18+
await exec("sudo", [
19+
"bash",
20+
"-c",
21+
"echo 'extra-trusted-substituters = https://cache.floxdev.com' >> /etc/nix/nix.conf",
22+
]);
23+
await exec("sudo", [
24+
"bash",
25+
"-c",
26+
"echo 'extra-trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= flox-store-public-0:8c/B+kjIaQ+BloCmNkRUKwaVPFWkriSAd0JJvuDu4F0=' >> /etc/nix/nix.conf",
27+
]);
1828
if (cacheEnabled) {
1929
const cacheRestored = await restoreCache([NIX_DIR, NIX_INSTALL_DIR], cacheKey);
2030
if (cacheRestored) {

src/setup.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ export default async (): Promise<{
2121
let cacheHit = false;
2222
let version: string | undefined;
2323

24+
await exec("sudo", [
25+
"bash",
26+
"-c",
27+
"echo 'extra-trusted-substituters = https://cache.floxdev.com' >> /etc/nix/nix.conf",
28+
]);
29+
await exec("sudo", [
30+
"bash",
31+
"-c",
32+
"echo 'extra-trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= flox-store-public-0:8c/B+kjIaQ+BloCmNkRUKwaVPFWkriSAd0JJvuDu4F0=' >> /etc/nix/nix.conf",
33+
]);
34+
2435
if (cacheEnabled) {
2536
const cacheRestored = await restoreCache(
2637
[NIX_DIR, NIX_INSTALL_DIR],

0 commit comments

Comments
 (0)