diff options
author | Vincent Ambo <mail@tazj.in> | 2025-01-12T16·56+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2025-01-14T17·51+0000 |
commit | d2d06241a020c19d346f41f9f4e03a58c1f852a3 (patch) | |
tree | c514929c770687ea529131bdab3e6324742a0504 | |
parent | c948a26d7d38ca91dbd0912c491452230839de25 (diff) |
feat(ops/tvl-cache): add option for using experimental cache r/9094
Adds a `tvl.cache.builderball` option for cache *consumers* which enables the experimental builderball cache. This cache uses whitby AND nevsky. Change-Id: I4d99ba52d6ebd9a49e6fcb931d01e69383b15bcf Reviewed-on: https://cl.tvl.fyi/c/depot/+/12986 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
-rw-r--r-- | ops/machines/nevsky/default.nix | 4 | ||||
-rw-r--r-- | ops/machines/whitby/default.nix | 4 | ||||
-rw-r--r-- | ops/modules/tvl-cache.nix | 5 | ||||
-rw-r--r-- | users/tazjin/nixos/tverskoy/default.nix | 1 |
4 files changed, 13 insertions, 1 deletions
diff --git a/ops/machines/nevsky/default.nix b/ops/machines/nevsky/default.nix index 8453415dae22..3b8d8a156bfd 100644 --- a/ops/machines/nevsky/default.nix +++ b/ops/machines/nevsky/default.nix @@ -208,6 +208,10 @@ in services.depot.builderball.enable = true; + # Use TVL cache locally through the proxy; for cross-builder substitution. + tvl.cache.enable = true; + tvl.cache.builderball = true; + security.sudo.extraRules = [{ groups = [ "wheel" ]; commands = [{ command = "ALL"; options = [ "NOPASSWD" ]; }]; diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix index 8c0b7d1841dd..786b240004f3 100644 --- a/ops/machines/whitby/default.nix +++ b/ops/machines/whitby/default.nix @@ -674,5 +674,9 @@ in zramSwap.enable = true; + # Use TVL cache locally through the proxy; for cross-builder substitution. + tvl.cache.enable = true; + tvl.cache.builderball = true; + system.stateVersion = "20.03"; } diff --git a/ops/modules/tvl-cache.nix b/ops/modules/tvl-cache.nix index 683818d103b7..e6edacf80184 100644 --- a/ops/modules/tvl-cache.nix +++ b/ops/modules/tvl-cache.nix @@ -3,6 +3,7 @@ { options = { tvl.cache.enable = lib.mkEnableOption "the TVL binary cache"; + tvl.cache.builderball = lib.mkEnableOption "use experimental builderball cache"; }; config = lib.mkIf config.tvl.cache.enable { @@ -12,7 +13,9 @@ ]; substituters = [ - "https://cache.tvl.su" + (if config.tvl.cache.builderball + then "https://cache.tvl.fyi" + else "https://cache.tvl.su") ]; }; }; diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix index 95b6a9ef10be..353a03bad424 100644 --- a/users/tazjin/nixos/tverskoy/default.nix +++ b/users/tazjin/nixos/tverskoy/default.nix @@ -28,6 +28,7 @@ lib.fix (self: { ] ++ lib.optional (builtins.pathExists ./local-config.nix) ./local-config.nix; tvl.cache.enable = true; + tvl.cache.builderball = true; boot = { initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; |