about summary refs log tree commit diff
path: root/ops/nixos/whitby/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-04-04T18·24+0200
committertazjin <mail@tazj.in>2021-04-04T18·54+0000
commit0f1d3de26f252daff8c88d62e29d08c1548e4d3e (patch)
tree00eec561072b84e76aea2730fd87d45231ef6109 /ops/nixos/whitby/default.nix
parentaae387456a7604834d463c305d9899516ec4513c (diff)
feat(whitby): Configure nix-serve on cache.tvl.su r/2436
Having a slow cache is better than having no cache.

Change-Id: Ie3cfcd4a2937d90b0e2ad899816bc31ae806631f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2847
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'ops/nixos/whitby/default.nix')
-rw-r--r--ops/nixos/whitby/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/ops/nixos/whitby/default.nix b/ops/nixos/whitby/default.nix
index dd8807cf7222..f7d8f4ef4a44 100644
--- a/ops/nixos/whitby/default.nix
+++ b/ops/nixos/whitby/default.nix
@@ -24,6 +24,7 @@ in lib.fix(self: {
     "${depot.depotPath}/ops/nixos/tvl-slapd/default.nix"
     "${depot.depotPath}/ops/nixos/tvl-sso/default.nix"
     "${depot.depotPath}/ops/nixos/www/b.tvl.fyi.nix"
+    "${depot.depotPath}/ops/nixos/www/cache.tvl.su.nix"
     "${depot.depotPath}/ops/nixos/www/cl.tvl.fyi.nix"
     "${depot.depotPath}/ops/nixos/www/code.tvl.fyi.nix"
     "${depot.depotPath}/ops/nixos/www/cs.tvl.fyi.nix"
@@ -307,6 +308,13 @@ in lib.fix(self: {
     ];
   };
 
+  services.nix-serve = {
+    enable = true;
+    port = 6443;
+    secretKeyFile = "/etc/secrets/nix-cache-key.sec";
+    bindAddress = "localhost";
+  };
+
   environment.systemPackages = with nixpkgs; [
     bb
     curl