Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
Gerschtli opened this issue Apr 30, 2024 · 2 comments
Open
2 tasks done

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

Gerschtli opened this issue Apr 30, 2024 · 2 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@Gerschtli
Copy link
Contributor

Gerschtli commented Apr 30, 2024

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • 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 #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 Gerschtli added bug triage Issues or feature request that have not been triaged yet labels Apr 30, 2024
@Gerschtli Gerschtli changed the title bug: home-manager with flake setup produces error on switch bug: home-manager path is garbage collected in flake setup Apr 30, 2024
@FrederikNJS
Copy link

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

@Mcrtin
Copy link

Mcrtin commented May 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

6 participants