From a834ddf88cb2eb4f77b7c0a2d6e2e8e0fb37c4e3 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 7 May 2023 11:26:13 +0200 Subject: [PATCH] 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 --- flake.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 3cb02d326..0b7eaa913 100644 --- a/flake.nix +++ b/flake.nix @@ -78,7 +78,8 @@ in throwForRemovedArgs (import ./modules { inherit pkgs lib check extraSpecialArgs; configuration = { ... }: { - imports = modules; + imports = modules + ++ [{ programs.home-manager.path = toString ./.; }]; nixpkgs = { inherit (pkgs) config overlays; }; }; }); @@ -96,7 +97,7 @@ let pkgs = nixpkgs.legacyPackages.${system}; docs = import ./docs { inherit pkgs; }; - hmPkg = pkgs.callPackage ./home-manager { }; + hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; }; in { default = hmPkg; home-manager = hmPkg;