mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
Similar to the `nixos-rebuild repl` command, `home-manager repl` will launch the Nix read-evaluate-print-loop environment with the Home Manager configuration loaded. To make that more useful, also add the pkgs and options attributes from the generated Home Manager configuration to the environment. This doesn't currently work with flakes, because I don't use them and I'm not confident I could safely test that function.
25 lines
356 B
Nix
25 lines
356 B
Nix
{
|
|
pkgs ? import <nixpkgs> { },
|
|
confPath,
|
|
confAttr ? null,
|
|
check ? true,
|
|
}:
|
|
|
|
let
|
|
|
|
env = import ../modules {
|
|
configuration =
|
|
if confAttr == "" || confAttr == null then confPath else (import confPath).${confAttr};
|
|
pkgs = pkgs;
|
|
check = check;
|
|
};
|
|
|
|
in
|
|
{
|
|
inherit (env)
|
|
activationPackage
|
|
config
|
|
pkgs
|
|
options
|
|
;
|
|
}
|