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 fails to activate when .drvs are not present in the nix-store #4928

Open
2 tasks done
tnichols217 opened this issue Jan 19, 2024 · 1 comment · May be fixed by #5523
Open
2 tasks done

bug: home-manager fails to activate when .drvs are not present in the nix-store #4928

tnichols217 opened this issue Jan 19, 2024 · 1 comment · May be fixed by #5523
Assignees
Labels
bug status: stale triage Issues or feature request that have not been triaged yet

Comments

@tnichols217
Copy link

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

Home-manager will fail to activate when specific .drvs are unavailable (due to a limitation in nix-env). This limitation is however not present in the new nix profile. I have attempted to force home-manager to use nix profile to circumvent this issue, but is proving difficult with all the checks home-manager places on the fs. I would like a way to force (through a module option) home-manager to use nix profile instead of nix-env, as well all of the rest of my system being on flakes.

https://github.com/nix-community/home-manager/blob/master/modules/home-environment.nix#L600

Here, the only check to decide whether to use nix profile or nix-env is simply whether "${cfg.profileDirectory}/manifest.json" exists, but I feel like this is a very rudimentary way of choosing whether to use nix profile or nix-env. Simply touching that file so that home-manager will be happy also does not work as the profile will fail to change.

Like I said, I would prefer to have a module option to specify usage of nix profile vs nix-env, with the default option to keep the current behavior (as to reduce impact on unaffected systems). I would be happy to contribute once I familiarize myself with the structure of home manager. Feedback on a solution is also welcome!

Maintainer CC

No response

System information

- system: `"x86_64-linux"`
- host os: `Linux 6.7.0-zen3, NixOS, 24.05 (Uakari), 24.05.20240117.842d9d8`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.1`
- channels(root): `"nixos"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@tnichols217 tnichols217 added bug triage Issues or feature request that have not been triaged yet labels Jan 19, 2024
Copy link

stale bot commented Apr 20, 2024

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Apr 20, 2024
tnichols217 added a commit to tnichols217/home-manager that referenced this issue Jun 10, 2024
Added a new option home.forceNixProfiles to force the usage of 'nix profile' and not 'nix-env'
Fixes nix-community#4928 as nix profiles do not require the presence of .drvs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status: stale triage Issues or feature request that have not been triaged yet
Projects
None yet
4 participants