aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/modules/harness/lib.nix
blob: d4da08a8de4895d46955711cbc7779d9521f751d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}