macos: disable spotlight

This commit is contained in:
Domen Kožar 2020-02-26 11:08:25 +01:00
parent f57eb6b95e
commit a5f8eada85
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
2 changed files with 5 additions and 0 deletions

View file

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

View file

@ -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