Page MenuHomePhabricator

[Nix] Add nixos cache as default for install_nix.sh
ClosedPublic

Authored by jon on Nov 10 2022, 10:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 11:49 AM
Unknown Object (File)
Sat, Nov 9, 11:49 AM
Unknown Object (File)
Fri, Nov 8, 9:04 PM
Unknown Object (File)
Fri, Nov 8, 5:23 PM
Unknown Object (File)
Tue, Nov 5, 2:08 AM
Unknown Object (File)
Mon, Nov 4, 12:22 AM
Unknown Object (File)
Mon, Nov 4, 12:21 AM
Unknown Object (File)
Mon, Nov 4, 12:20 AM

Details

Summary

https://phab.comm.dev/D5563#164976

This is to enable older versions of nix which don't
add cache.nixos.org as a substituter by default.

Also fix the sed find logic.

Test Plan
cat /etc/nix/nix.conf
# confirm it's missing "https://cache.nixos.org" as a substituter

./scripts/install_nix.sh

# confirm "https://cache.nixos.org" is now a substituter

Diff Detail

Repository
rCOMM Comm
Branch
jonringer/nix-add-default-cache
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul@atuls-MacBook-Pro comm % cat /etc/nix/nix.conf
experimental-features = nix-command flakes
build-users-group = nixbld
trusted-users = @admin atul
cores = 4
max-jobs = 5
substituters = https://comm.cachix.org https://cache.nixos.org
trusted-public-keys = comm.cachix.org-1:70RF31rkmCEhQ9HrXA2uXcpqQKGcUK3TxLJdgcUCaA4= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
This revision is now accepted and ready to land.Nov 10 2022, 11:13 AM