about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ops/machines/whitby/default.nix1
-rw-r--r--ops/modules/default-imports.nix13
-rw-r--r--third_party/default.nix7
-rw-r--r--users/tazjin/nixos/tverskoy/default.nix2
4 files changed, 18 insertions, 5 deletions
diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix
index e082f9588919..dbd8c616401c 100644
--- a/ops/machines/whitby/default.nix
+++ b/ops/machines/whitby/default.nix
@@ -7,7 +7,6 @@ let
 in {
   imports = [
     "${depot.path}/ops/modules/atward.nix"
-    "${depot.path}/ops/modules/automatic-gc.nix"
     "${depot.path}/ops/modules/clbot.nix"
     "${depot.path}/ops/modules/gerrit-queue.nix"
     "${depot.path}/ops/modules/git-serving.nix"
diff --git a/ops/modules/default-imports.nix b/ops/modules/default-imports.nix
new file mode 100644
index 000000000000..acd70bd05f01
--- /dev/null
+++ b/ops/modules/default-imports.nix
@@ -0,0 +1,13 @@
+{ depot, ... }:
+
+# Default set of modules that are imported in all Depot nixos systems
+#
+# All modules here should be properly gated behind a `lib.mkEnableOption` with a
+# `lib.mkIf` for the config.
+
+{
+  imports = [
+    ./automatic-gc.nix
+    ./tvl-cache.nix
+  ];
+}
diff --git a/third_party/default.nix b/third_party/default.nix
index 5a244ed22039..e9e3c117cec0 100644
--- a/third_party/default.nix
+++ b/third_party/default.nix
@@ -12,7 +12,7 @@
 #    other folders below //third_party, other than the ones mentioned
 #    above.
 
-{ pkgs, ... }:
+{ pkgs, depot, ... }:
 
 {
   # Expose a partially applied NixOS, expecting an attribute set with
@@ -33,7 +33,10 @@
   let
     eval = import "${pkgs.path}/nixos/lib/eval-config.nix" {
       inherit specialArgs system;
-      modules = [ configuration ];
+      modules = [
+        configuration
+        (import "${depot.path + "/ops/modules/default-imports.nix"}")
+      ];
     };
 
     # This is for `nixos-rebuild build-vm'.
diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix
index 45bf8c97124c..757d38f13552 100644
--- a/users/tazjin/nixos/tverskoy/default.nix
+++ b/users/tazjin/nixos/tverskoy/default.nix
@@ -18,8 +18,6 @@ config: let
 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"
   ];