diff --git a/lib/main.js b/lib/main.js index efc2bf3..5afb8a3 100644 --- a/lib/main.js +++ b/lib/main.js @@ -42,6 +42,8 @@ function run() { // Catalina workaround https://github.com/NixOS/nix/issues/2925 if (os_1.type() == "Darwin") { child_process_1.execFileSync(`${__dirname}/create-darwin-volume.sh`, { stdio: 'inherit' }); + // Disable spotlight indexing of /nix to speed up performance + yield exec.exec("sudo", ["mdutil", "-i", "off", "/nix"]); } // Needed due to multi-user being too defensive core.exportVariable('ALLOW_PREEXISTING_INSTALLATION', "1"); diff --git a/src/main.ts b/src/main.ts index 3ab93fb..565186b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,6 +27,9 @@ async function run() { // Catalina workaround https://github.com/NixOS/nix/issues/2925 if (type() == "Darwin") { execFileSync(`${__dirname}/create-darwin-volume.sh`, { stdio: 'inherit' }); + + // Disable spotlight indexing of /nix to speed up performance + await exec.exec("sudo", ["mdutil", "-i", "off", "/nix"]); } // Needed due to multi-user being too defensive