diff options
author | Griffin Smith <grfn@gws.fyi> | 2021-12-15T22·44-0500 |
---|---|---|
committer | grfn <grfn@gws.fyi> | 2021-12-15T23·36+0000 |
commit | 0f5cc25697b3d43f64ed2914e186cecee75efce7 (patch) | |
tree | 56fc5420794aaca93d6f6b39f3bfd4a7a9672157 /ops/modules | |
parent | 47f1f3be5f3c8ebaf739339e6121bfa26e951037 (diff) |
feat(ops/modules): Add shared module for TVL cache r/3261
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 <mail@tazj.in> Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: grfn <grfn@gws.fyi>
Diffstat (limited to 'ops/modules')
-rw-r--r-- | ops/modules/tvl-cache.nix | 19 |
1 files changed, 19 insertions, 0 deletions
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" + ]; + }; + }; +} |