mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-24 18:19:01 +00:00
lib/env-builders: add builders for home-manager and wrapper-manager
This commit is contained in:
parent
9bffd41676
commit
5048eae58d
@ -82,4 +82,59 @@ rec {
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
nixosSystem.config.system.build.${nixosSystem.config.formatAttr};
|
nixosSystem.config.system.build.${nixosSystem.config.formatAttr};
|
||||||
|
|
||||||
|
mkHome = {
|
||||||
|
pkgs,
|
||||||
|
homeManagerSrc,
|
||||||
|
lib ? pkgs.lib,
|
||||||
|
modules ? [ ],
|
||||||
|
specialArgs ? { },
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
homeModules = ../modules/home-manager;
|
||||||
|
in
|
||||||
|
import "${homeManagerSrc}/modules" {
|
||||||
|
inherit pkgs lib;
|
||||||
|
check = true;
|
||||||
|
extraSpecialArgs = specialArgs // {
|
||||||
|
foodogsquaredModulesPath = builtins.toString homeModules;
|
||||||
|
};
|
||||||
|
configuration = { lib, ... }: {
|
||||||
|
imports = modules ++ lib.singleton {
|
||||||
|
imports = [
|
||||||
|
homeModules
|
||||||
|
../modules/home-manager/_private
|
||||||
|
];
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
programs.home-manager.path = homeManagerSrc;
|
||||||
|
inherit (pkgs) overlays;
|
||||||
|
nixpkgs.config = lib.mkDefault pkgs.config;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mkWrapper = {
|
||||||
|
pkgs,
|
||||||
|
lib ? pkgs.lib,
|
||||||
|
wrapperManagerSrc,
|
||||||
|
modules ? [ ],
|
||||||
|
specialArgs ? { },
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
wrapperManagerModules = ../modules/wrapper-manager;
|
||||||
|
wrapperManager = import wrapperManagerSrc { };
|
||||||
|
in
|
||||||
|
wrapperManager.lib.build {
|
||||||
|
inherit pkgs lib;
|
||||||
|
specialArgs = specialArgs // {
|
||||||
|
foodogsquaredModulesPath = builtins.toString wrapperManagerModules;
|
||||||
|
};
|
||||||
|
modules = modules ++ lib.singleton {
|
||||||
|
imports = [
|
||||||
|
wrapperManagerModules
|
||||||
|
../modules/wrapper-manager/_private
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user