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

Support XDG Base Directory-respecting Nix-user configuration #255

Closed
Liassica opened this issue Apr 22, 2024 · 3 comments
Closed

Support XDG Base Directory-respecting Nix-user configuration #255

Liassica opened this issue Apr 22, 2024 · 3 comments

Comments

@Liassica
Copy link

Is your feature request related to a problem? Please describe.
Currently, Hyfetch will not pick up Nix-user packages if the folder (or symlink) ~/.nix-profile is not present (i.e. Nix is set to respect XDG Base Directory). For example, if nix.settings.use-xdg-base-directories is set to true in Home Manager, Home Manager will not create the file ~/.nix-profile, causing this behavior.

Describe the solution you'd like
If Hyfetch could be adjusted to check $XDG_STATE_HOME/nix/profile instead, that would be wonderful. As far as I can tell, in modern versions of Nix ~/.nix-profile is already a symbolic link to this folder anyway.

Describe alternatives you've considered
Hyfetch could also check both of these locations, similar to how it currently checks both ~/.nix-profile and /etc/profiles/per-user/"$USER". However, like I said, I believe ~/.nix-profile is already a symlink to $XDG_STATE_HOME/nix/profile anyway, so this would be redundant.

Additional context
N/A

hykilpikonna added a commit that referenced this issue Apr 25, 2024
@hykilpikonna
Copy link
Owner

Okay I added the XDG path which will be used if ~/.nix-profile doesn't exist. Should work but I haven't tested it since I don't have a nixos system around anymore. Can you test it for me? Thanks.

@Liassica
Copy link
Author

Seems to work, thank you very much!

@hykilpikonna
Copy link
Owner

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants