about summary refs log tree commit diff
path: root/ops/nixos/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'ops/nixos/default.nix')
-rw-r--r--ops/nixos/default.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix
index 312d762f24..1d1e8da192 100644
--- a/ops/nixos/default.nix
+++ b/ops/nixos/default.nix
@@ -19,15 +19,23 @@ rec {
 
   allSystems = import ./all-systems.nix args;
 
-  nixosFor = configuration: depot.third_party.nixos {
-    configuration = {
-      inherit depot;
+  # This provides our standard set of arguments to all NixOS modules.
+  baseModule = { ... }: {
+    _module.args = {
+      inherit (args) depot;
+    };
+  };
+
+  nixosFor = configuration: (depot.third_party.nixos {
+    configuration = { ... }: {
       imports = [
+        baseModule
+        "${depot.depotPath}/ops/nixos/depot.nix"  # TODO(lukegb): remove this once config.depot is no longer referenced.
         configuration
-        "${depot.depotPath}/ops/nixos/depot.nix"
       ];
+      config.depot = depot;
     };
-  };
+  });
 
   findSystem = hostname:
     (findFirst