home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

bug: home-manager path is garbage collected in flake setup

Open Gerschtli opened this issue 9 months ago • 1 comments

Are you following the right branch?

  • [X] My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • [X] I have searched the existing issues

Issue description

If I run gc and then home-manager switch --flake . I get

Home Manager not found at /nix/store/9613fxrf433y10fz18ccixj4zpmdibzq-source.
[...]
error: file 'home-manager/home-manager/build-news.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)

The line https://github.com/nix-community/home-manager/blob/master/flake.nix#L81 despite "${./.}" does not seem to create a gc root in my nix store.

Full config is available at https://github.com/Gerschtli/nix-config (github:Gerschtli/nix-config#homeConfigurations.tobiashapp@bwpm-FP2CYXKY2V).

Maintainer CC

@Kareem-Medhat (as it seems to be related to https://github.com/nix-community/home-manager/pull/5205) @rycee

System information

- system: `"aarch64-darwin"`
 - host os: `Darwin 23.4.0, macOS 14.4.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/store/4x11z78x84bvvx740jx16d312bvz82pv-source`

Gerschtli avatar Apr 30 '24 08:04 Gerschtli

I think I'm hitting the same issue on NixOS stable, with stand-alone home-manager installed via a flake setup

FrederikNJS avatar May 08 '24 20:05 FrederikNJS

I think I'm facing the same problem; the first time I ran home-manager switch everything was fine. After that, I got the error:

error: file 'home-manager/home-manager/home-manager.nix' was not found ...
       at <<none>>:0:  (source not available)

when I run nix-shell -p home-manager everything works as expected again (yes, I added home-manager as a package in configuration.nix and ran sudo nixos-rebuild switch to verify that I'm at the newest version).

I'm new to nixos so I could definitely done something wrong.

Mcrtin avatar May 13 '24 08:05 Mcrtin

The same on me

chiichen avatar Aug 01 '24 15:08 chiichen