From fd9880e00d28c260bc33520ba7084134306df2a4 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 14 Feb 2024 15:23:49 -0500 Subject: [PATCH] feat(nix): add rebuild script for when local cache is down --- common/modules/cachix.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/common/modules/cachix.nix b/common/modules/cachix.nix index 72d9471b..a82ef41d 100644 --- a/common/modules/cachix.nix +++ b/common/modules/cachix.nix @@ -1,4 +1,18 @@ -{...}: { +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + (writeShellApplication { + name = "rebuild-no-cache"; + runtimeInputs = [config.nh.package]; + text = '' + nh os switch -- --option binary-caches "https://cache.nixos.org" "$@" + ''; + }) + ]; + nix = { settings = { substituters = [