mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
lib/home-manager: init
This commit is contained in:
parent
5f70747853
commit
8ec51bff48
19
lib/home-manager.nix
Normal file
19
lib/home-manager.nix
Normal file
@ -0,0 +1,19 @@
|
||||
# Custom libraries for home-manager library.
|
||||
{ lib }:
|
||||
|
||||
{
|
||||
/*
|
||||
Checks if there is the `osConfig` attribute and get the attribute path from
|
||||
its system configuration.
|
||||
*/
|
||||
getOSConfigPath =
|
||||
# The configuration attribute set of the home-manager configuration.
|
||||
attrs:
|
||||
|
||||
# A list of strings representing the attribute path.
|
||||
attrPath:
|
||||
|
||||
# The default value when `attrPath` is missing.
|
||||
default:
|
||||
attrs ? osConfig && lib.attrByPath attrPath default attrs;
|
||||
}
|
@ -43,7 +43,10 @@ in
|
||||
mkImage = { pkgs ? null, extraModules ? [ ], format ? "iso" }:
|
||||
inputs.nixos-generators.nixosGenerate {
|
||||
inherit pkgs format;
|
||||
lib = pkgs.lib.extend extendLib;
|
||||
lib = pkgs.lib.extend (self: super:
|
||||
import ./. { lib = super; }
|
||||
// import ./private.nix { lib = self; }
|
||||
// import ./home-manager.nix { lib = self; });
|
||||
modules = extraModules;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user