1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-21 05:47:29 +02:00

home-manager: fix missing string context

The `home-manager` package was being passed a `path` string pointing a
store path while the string didn't have context. As a result the
`home-manager` derivation was created without this path as an input
source allowing it to be garbage collected even though it it being
used by the `home-manager` script. This in turn caused certain
warnings and errors to occur.
This commit is contained in:
Kareem-Medhat 2024-04-02 02:05:46 +02:00 committed by Mikilio
parent f12985a3e8
commit 906ba78d03
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -78,8 +78,7 @@
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 = "${./.}"; }];
++ [{ programs.home-manager.path = toString ./.; }];
nixpkgs = { nixpkgs = {
config = nixpkgs.lib.mkDefault pkgs.config; config = nixpkgs.lib.mkDefault pkgs.config;
inherit (pkgs) overlays; inherit (pkgs) overlays;
@ -112,7 +111,7 @@
inherit pkgs; inherit pkgs;
inherit (releaseInfo) release isReleaseBranch; inherit (releaseInfo) release isReleaseBranch;
}; };
hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; }; hmPkg = pkgs.callPackage ./home-manager { path = "${./.}"; };
testPackages = let testPackages = let
tests = import ./tests { inherit pkgs; }; tests = import ./tests { inherit pkgs; };