aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/modules/harness/lib.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/modules/harness/lib.nix')
-rw-r--r--infra/libkookie/modules/harness/lib.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/infra/libkookie/modules/harness/lib.nix b/infra/libkookie/modules/harness/lib.nix
new file mode 100644
index 000000000000..d4da08a8de48
--- /dev/null
+++ b/infra/libkookie/modules/harness/lib.nix
@@ -0,0 +1,18 @@
+{ config, lib, pkgs, ... } @ args:
+
+let
+ makeModPath = (base: name: base + "/${name}.nix");
+ loader = import ./hm-loader.nix;
+in
+{
+ # Load a home-manager configuration module
+ #
+ # Returns a home-manager loader closure configured with the
+ # correct module derivation (by device) and active user set
+ # enabled via `libkookie.activeUsers`.
+ loadModule = (mod: dev:
+ (loader (makeModPath mod dev) config.libkookie.activeUsers));
+
+ # Load a simple path with the standard set of arguments
+ load = path: (import path) args;
+}