My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/infra/libkookie/modules/harness/lib.nix

26 lines
848 B

{ 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;
# Patch an attribute set with access to the original set
#
# This function wraps around lib.recursiveUpdate to make it slighly
# less cumbersome to work with in one-liners.
patchAttrs = attrs: f: (lib.recursiveUpdate attrs (f attrs));
mkDefault = lib.mkOverride ((lib.mkDefault null).priority - 1);
}