From 0f5cc25697b3d43f64ed2914e186cecee75efce7 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Wed, 15 Dec 2021 17:44:37 -0500 Subject: feat(ops/modules): Add shared module for TVL cache Add a shared nixos module for configuring whitby as a binary nix cache, and refactor tverskoy to use this module. This is enabled via an option to pave the way for including it as an import in all depot-generated nixos configs at some point in the future. Change-Id: I6dcc0e8eb48b1ac34457666dceebeedd5da6c526 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4344 Tested-by: BuildkiteCI Reviewed-by: tazjin Reviewed-by: wpcarro Autosubmit: grfn --- ops/modules/tvl-cache.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ops/modules/tvl-cache.nix (limited to 'ops/modules/tvl-cache.nix') diff --git a/ops/modules/tvl-cache.nix b/ops/modules/tvl-cache.nix new file mode 100644 index 000000000000..4d574821df44 --- /dev/null +++ b/ops/modules/tvl-cache.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +{ + options = { + tvl.cache.enable = lib.mkEnableOption "the TVL binary cache"; + }; + + config = lib.mkIf config.tvl.cache.enable { + nix = { + binaryCachePublicKeys = [ + "cache.tvl.su:kjc6KOMupXc1vHVufJUoDUYeLzbwSr9abcAKdn/U1Jk=" + ]; + + binaryCaches = [ + "https://cache.tvl.su" + ]; + }; + }; +} -- cgit 1.4.1