From 7315b25d83dbf624f892712da581fdd2757c7cf1 Mon Sep 17 00:00:00 2001 From: Sander Date: Thu, 17 Oct 2024 00:11:45 +0400 Subject: [PATCH] devenv: fixup nixos-specific cache fallback docs --- devenv/src/cnix.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/devenv/src/cnix.rs b/devenv/src/cnix.rs index f92a37e2f..c57ca014e 100644 --- a/devenv/src/cnix.rs +++ b/devenv/src/cnix.rs @@ -708,14 +708,20 @@ impl<'a> Nix<'a> { b) Add binary caches to /etc/nix/nix.conf yourself by editing configuration.nix: {{ nix.extraOptions = '' - extra-substituters = {}; - extra-trusted-public-keys = {}; + extra-substituters = {} + extra-trusted-public-keys = {} ''; }} - Lastly rebuild your system + Disable automatic cache configuration in `devenv.nix`: - $ sudo nixos-rebuild switch + {{ + cachix.enable = false; + }} + + Lastly, rebuild your system: + + $ sudo nixos-rebuild switch ", whoami::username() , caches.caches.pull.iter().map(|cache| format!("https://{}.cachix.org", cache)).collect::>().join(" ") , caches.known_keys.values().cloned().collect::>().join(" ")