about summary refs log tree commit diff
path: root/ops
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-04-12T20·26+0200
committertazjin <mail@tazj.in>2021-04-12T21·55+0000
commitf520bd40cab9bae4f8fa26fe36365a7bf9bccd5a (patch)
tree5f116d10e44b7f3616fb63c28e7de03d81869071 /ops
parenta5591359702b62e4edd7fdbbd135475037aa6727 (diff)
refactor: Replace 'depotPath' with 'depot.path' r/2497
Instead of having two ways of accessing the path to the depot (one of
which was stuttering, depot.depotPath) we settle on only one:
depot.path.

This was mostly used for NixOS module imports.

Co-Authored-By: Florian Klink <flokli@flokli.de>
Change-Id: I2c0db23383fc34f6ca76baaad4cc4af2d9dfae15
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2962
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'ops')
-rw-r--r--ops/machines/whitby/default.nix40
-rw-r--r--ops/modules/www/wigglydonke.rs.nix2
-rw-r--r--ops/nixos.nix2
3 files changed, 22 insertions, 22 deletions
diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix
index df280b96f7..554caa6642 100644
--- a/ops/machines/whitby/default.nix
+++ b/ops/machines/whitby/default.nix
@@ -6,26 +6,26 @@ let
   inherit (lib) range;
 in lib.fix(self: {
   imports = [
-    "${depot.depotPath}/ops/modules/clbot.nix"
-    "${depot.depotPath}/ops/modules/irccat.nix"
-    "${depot.depotPath}/ops/modules/monorepo-gerrit.nix"
-    "${depot.depotPath}/ops/modules/panettone.nix"
-    "${depot.depotPath}/ops/modules/paroxysm.nix"
-    "${depot.depotPath}/ops/modules/smtprelay.nix"
-    "${depot.depotPath}/ops/modules/sourcegraph.nix"
-    "${depot.depotPath}/ops/modules/tvl-buildkite.nix"
-    "${depot.depotPath}/ops/modules/tvl-slapd/default.nix"
-    "${depot.depotPath}/ops/modules/tvl-sso/default.nix"
-    "${depot.depotPath}/ops/modules/www/b.tvl.fyi.nix"
-    "${depot.depotPath}/ops/modules/www/cache.tvl.su.nix"
-    "${depot.depotPath}/ops/modules/www/cl.tvl.fyi.nix"
-    "${depot.depotPath}/ops/modules/www/code.tvl.fyi.nix"
-    "${depot.depotPath}/ops/modules/www/cs.tvl.fyi.nix"
-    "${depot.depotPath}/ops/modules/www/login.tvl.fyi.nix"
-    "${depot.depotPath}/ops/modules/www/tazj.in.nix"
-    "${depot.depotPath}/ops/modules/www/todo.tvl.fyi.nix"
-    "${depot.depotPath}/ops/modules/www/tvl.fyi.nix"
-    "${depot.depotPath}/ops/modules/www/wigglydonke.rs.nix"
+    "${depot.path}/ops/modules/clbot.nix"
+    "${depot.path}/ops/modules/irccat.nix"
+    "${depot.path}/ops/modules/monorepo-gerrit.nix"
+    "${depot.path}/ops/modules/panettone.nix"
+    "${depot.path}/ops/modules/paroxysm.nix"
+    "${depot.path}/ops/modules/smtprelay.nix"
+    "${depot.path}/ops/modules/sourcegraph.nix"
+    "${depot.path}/ops/modules/tvl-buildkite.nix"
+    "${depot.path}/ops/modules/tvl-slapd/default.nix"
+    "${depot.path}/ops/modules/tvl-sso/default.nix"
+    "${depot.path}/ops/modules/www/b.tvl.fyi.nix"
+    "${depot.path}/ops/modules/www/cache.tvl.su.nix"
+    "${depot.path}/ops/modules/www/cl.tvl.fyi.nix"
+    "${depot.path}/ops/modules/www/code.tvl.fyi.nix"
+    "${depot.path}/ops/modules/www/cs.tvl.fyi.nix"
+    "${depot.path}/ops/modules/www/login.tvl.fyi.nix"
+    "${depot.path}/ops/modules/www/tazj.in.nix"
+    "${depot.path}/ops/modules/www/todo.tvl.fyi.nix"
+    "${depot.path}/ops/modules/www/tvl.fyi.nix"
+    "${depot.path}/ops/modules/www/wigglydonke.rs.nix"
     "${pkgs.path}/nixos/modules/services/web-apps/gerrit.nix"
   ];
 
diff --git a/ops/modules/www/wigglydonke.rs.nix b/ops/modules/www/wigglydonke.rs.nix
index 4643b34317..bdfbca58d8 100644
--- a/ops/modules/www/wigglydonke.rs.nix
+++ b/ops/modules/www/wigglydonke.rs.nix
@@ -9,7 +9,7 @@
     services.nginx.virtualHosts."wigglydonke.rs" = {
       enableACME = true;
       forceSSL = true;
-      root = "${depot.depotPath}/users/grfn/wigglydonke.rs";
+      root = "${depot.path}/users/grfn/wigglydonke.rs";
     };
   };
 }
diff --git a/ops/nixos.nix b/ops/nixos.nix
index 465a2eed31..6a583c53db 100644
--- a/ops/nixos.nix
+++ b/ops/nixos.nix
@@ -33,7 +33,7 @@ in rec {
     fi
 
     echo "Rebuilding NixOS for $HOSTNAME"
-    system=$(nix-build -E "((import ${toString depot.depotPath} {}).ops.nixos.findSystem \"$HOSTNAME\").system" --no-out-link --show-trace)
+    system=$(nix-build -E "((import ${toString depot.path} {}).ops.nixos.findSystem \"$HOSTNAME\").system" --no-out-link --show-trace)
 
     nix-env -p /nix/var/nix/profiles/system --set $system
     $system/bin/switch-to-configuration switch