about summary refs log tree commit diff
path: root/ops/nixos/modules/depot.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-26T00·17+0000
committerVincent Ambo <tazjin@google.com>2020-05-26T00·17+0000
commit68e384a77f654ed3007bba11c799a850c807bedd (patch)
tree459c90aaa0f3f56fc1c8d1f946261f4d8a932a21 /ops/nixos/modules/depot.nix
parent93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (diff)
ffeat(ops/nixos): Add a dummy to make depot available in modules r/853
Because modules are not called via the default depot setup (for now
...), this introduces a dummy module that stores the depot tree itself
in the module configurations.

This makes it possible to write modules that use packages from the
depot.
Diffstat (limited to 'ops/nixos/modules/depot.nix')
-rw-r--r--ops/nixos/modules/depot.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/ops/nixos/modules/depot.nix b/ops/nixos/modules/depot.nix
new file mode 100644
index 0000000000..20220e9f57
--- /dev/null
+++ b/ops/nixos/modules/depot.nix
@@ -0,0 +1,16 @@
+# This module makes it possible to get at the depot from "proper"
+# NixOS modules.
+#
+# It needs to be included and configured in each system like this:
+#
+# {
+#   imports = [ ../modules/depot.nix ];
+#   inherit depot;
+# }
+{ lib, ... }:
+
+{
+  options.depot = with lib; mkOption {
+    description = "tazjin's imported monorepo";
+  };
+}