1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-30 06:59:45 +01:00

flake: set source path in home-manager tool

This makes sure that a NIX_PATH entry is added for use by non-flake
commands, for example `home-manager uninstall`.

Fixes #3948
This commit is contained in:
Robert Helgesson 2023-05-07 11:26:13 +02:00
parent 669669fcb4
commit a834ddf88c
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -78,7 +78,8 @@
in throwForRemovedArgs (import ./modules { in throwForRemovedArgs (import ./modules {
inherit pkgs lib check extraSpecialArgs; inherit pkgs lib check extraSpecialArgs;
configuration = { ... }: { configuration = { ... }: {
imports = modules; imports = modules
++ [{ programs.home-manager.path = toString ./.; }];
nixpkgs = { inherit (pkgs) config overlays; }; nixpkgs = { inherit (pkgs) config overlays; };
}; };
}); });
@ -96,7 +97,7 @@
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
docs = import ./docs { inherit pkgs; }; docs = import ./docs { inherit pkgs; };
hmPkg = pkgs.callPackage ./home-manager { }; hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; };
in { in {
default = hmPkg; default = hmPkg;
home-manager = hmPkg; home-manager = hmPkg;