diff options
-rw-r--r-- | ops/modules/tvl-cache.nix | 19 | ||||
-rw-r--r-- | users/tazjin/nixos/tverskoy/default.nix | 11 |
2 files changed, 21 insertions, 9 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" + ]; + }; + }; +} diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix index 403e9cd6f27c..45bf8c97124c 100644 --- a/users/tazjin/nixos/tverskoy/default.nix +++ b/users/tazjin/nixos/tverskoy/default.nix @@ -19,18 +19,11 @@ in lib.fix(self: { imports = [ "${depot.third_party.impermanence}/nixos.nix" "${depot.path + "/ops/modules/automatic-gc.nix"}" + "${depot.path + "/ops/modules/tvl-cache.nix"}" "${pkgs.home-manager.src}/nixos" ]; - nix = { - binaryCachePublicKeys = [ - "cache.tvl.su:kjc6KOMupXc1vHVufJUoDUYeLzbwSr9abcAKdn/U1Jk=" - ]; - - binaryCaches = [ - "https://cache.tvl.su" - ]; - }; + tvl.cache.enable = true; boot = rec { initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; |