From 119df03a50c8f3bf49227c7778701c34a4bf2266 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 1 Feb 2025 23:51:13 +0300 Subject: [PATCH] style(ops/nevsky): centralise depot services in a config block Change-Id: I46ceb8fdbcb49e98772cb272a7b775761f9d1ed0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13072 Reviewed-by: sterni Tested-by: BuildkiteCI --- ops/machines/nevsky/default.nix | 47 ++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/ops/machines/nevsky/default.nix b/ops/machines/nevsky/default.nix index e4a7a9a1e..54ca8a93f 100644 --- a/ops/machines/nevsky/default.nix +++ b/ops/machines/nevsky/default.nix @@ -246,31 +246,34 @@ in useRoutingFeatures = "both"; }; - # Run a Harmonia binary cache. - # - # TODO(tazjin): switch to upstream module after fix for Nix 2.3 - services.depot.harmonia = { - enable = true; - signKeyPaths = [ (config.age.secretsDir + "/nix-cache-priv") ]; - settings.bind = "127.0.0.1:6443"; - settings.priority = 50; - }; + services.depot = { + # Run a Harmonia binary cache. + # + # TODO(tazjin): switch to upstream module after fix for Nix 2.3 + harmonia = { + enable = true; + signKeyPaths = [ (config.age.secretsDir + "/nix-cache-priv") ]; + settings.bind = "127.0.0.1:6443"; + settings.priority = 50; + }; - services.depot.builderball.enable = true; + builderball.enable = true; - # Automatically collect garbage from the Nix store. - services.depot.automatic-gc = { - enable = true; - interval = "1 hour"; - diskThreshold = 200; # GiB - maxFreed = 420; # GiB - preserveGenerations = "60d"; - }; - # Run a handful of Buildkite agents to support parallel builds. - services.depot.buildkite = { - enable = true; - agentCount = 16; + # Automatically collect garbage from the Nix store. + automatic-gc = { + enable = true; + interval = "1 hour"; + diskThreshold = 200; # GiB + maxFreed = 420; # GiB + preserveGenerations = "60d"; + }; + + # Run a handful of Buildkite agents to support parallel builds. + buildkite = { + enable = true; + agentCount = 16; + }; }; # Start a ZNC instance which bounces for tvlbot and owothia.