Remove $XDG_STATE_HOME/nix/profiles/home-manager from default installables#137
Open
reasonableperson wants to merge 1 commit intoutdemir:mainfrom
Open
Remove $XDG_STATE_HOME/nix/profiles/home-manager from default installables#137reasonableperson wants to merge 1 commit intoutdemir:mainfrom
reasonableperson wants to merge 1 commit intoutdemir:mainfrom
Conversation
This reverts commit 2e48b17.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default behaviour of nix-tree on my system is confusing. According to
nix-tree --help, the default store paths are~/.nix-profileand/var/run/current-system. However, in #110, an additional path,$XDG_STATE_HOME/nix/profiles/home-manager, was added.I am using home-manager standalone with flakes. As I understand it, running
home-manager switchcreates a profile which is symlinked to$XDG_STATE_HOME/nix/profiles/home-manager, and "activates" it by runningnix profile install. This means that the current user profile at~/.nix-profilecontains your home-manager configuration as well as any other packages installed imperatively withnix profile. By default, nix-tree will display both~/.nix-profileand$XDG_STATE_HOME/nix/profiles/home-manager. In the common case where there are no imperatively-installed packages, they will be almost identical and each will have an "added size" which is trivially small. This is confusing, especially on NixOS where the profile at/var/run/current-systemis also displayed, because it suggests that thehome-managerprofile adds little to the system configuration. Plus, it's inconsistent with the help text.I think the default behaviour should be as specified in the help text. If the user is using home-manager, it will be included in the tree of their current profile. The rationale seems to be that home-manager was doing "weird things" in #106, but I can't reproduce the observed behaviour of
$XDG_STATE_HOME/nix/profiles/profile(the equivalent of~/.nix-profilewhenuse-xdg-base-directoriesis enabled) being a directory rather than a symlink, which as noted in #71 (comment), is contrary to the Nix documentation and may be a misconfiguration.