fastfetch-cli / fastfetch

An actively maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
9.17k stars 371 forks source link

[FEAT] Support XDG Base Directory-respecting Nix user configuration #837

Closed Liassica closed 3 months ago

Liassica commented 3 months ago

Wanted features:

Currently, Fastfetch 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 folder ~/.nix-profile,[1] causing this behavior. The XDG Base Directory equivalent of ~/.nix-profile is $XDG_STATE_HOME/nix/profile.

Motivation:

Hyfetch had a similar issue, which I reported and that got fixed. I tried out Fastfetch today and noticed it had the same issue. The fix used there was to check ~/.nix-profile if it exists, otherwise falling back to $XDG_STATE_HOME/nix/profile.

CarterLi commented 3 months ago

@xoltia Can you take a look at this one?