diff --git a/common.nix b/common.nix index 3cdb883..843b344 100644 --- a/common.nix +++ b/common.nix @@ -5,6 +5,24 @@ time.timeZone = "Australia/Brisbane"; + # Without this, the installer only ever sees cache.nixos.org, which + # doesn't carry sops-install-secrets (it's built straight from the + # sops-nix flake's own Go source, not part of nixpkgs) — every install + # would otherwise compile it from scratch, which is what ran an 8GB LXC + # container's disk out of space. Push a built copy to nix-cache once + # (from a machine with real disk headroom) and every future install, + # of any type, fetches instead of rebuilding. + nix.settings = { + substituters = [ + "http://nix-cache" + "https://cache.nixos.org/" + ]; + trusted-public-keys = [ + "cache.local-1:usoWYanY3Kpq2+kDIS2nhWoLZiRxanmdysdzqCFBHW4=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + }; + environment.systemPackages = with pkgs; [ git curl