tvl-depot/ops/modules/tvl-cache.nix
Griffin Smith 0f5cc25697 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 <mail@tazj.in>
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: grfn <grfn@gws.fyi>
2021-12-15 23:36:22 +00:00

19 lines
362 B
Nix

{ 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"
];
};
};
}