You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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!
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.
Added a new option home.forceNixProfiles to force the usage of 'nix profile' and not 'nix-env'
Fixesnix-community#4928 as nix profiles do not require the presence of .drvs
Are you following the right branch?
Is there an existing issue for this?
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 newnix profile
. I have attempted to force home-manager to usenix 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 usenix profile
instead ofnix-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
ornix-env
is simply whether "${cfg.profileDirectory}/manifest.json" exists, but I feel like this is a very rudimentary way of choosing whether to usenix profile
ornix-env
. Simplytouch
ing 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
vsnix-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
The text was updated successfully, but these errors were encountered: