From 4be0464472675212654dedf3e021bd5f1d58b92f Mon Sep 17 00:00:00 2001 From: Kareem-Medhat <39652808+Kareem-Medhat@users.noreply.github.com> Date: Tue, 2 Apr 2024 02:05:46 +0200 Subject: [PATCH] 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. --- flake.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 02c7afac..3a90f89c 100644 --- a/flake.nix +++ b/flake.nix @@ -78,8 +78,7 @@ in throwForRemovedArgs (import ./modules { inherit pkgs lib check extraSpecialArgs; configuration = { ... }: { - imports = modules - ++ [{ programs.home-manager.path = toString ./.; }]; + imports = modules ++ [{ programs.home-manager.path = "${./.}"; }]; nixpkgs = { config = nixpkgs.lib.mkDefault pkgs.config; inherit (pkgs) overlays; @@ -112,7 +111,7 @@ inherit pkgs; inherit (releaseInfo) release isReleaseBranch; }; - hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; }; + hmPkg = pkgs.callPackage ./home-manager { path = "${./.}"; }; testPackages = let tests = import ./tests { inherit pkgs; };