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

load nix.sh from ~/.profile and update XDG_DATA_DIRS #3910

Closed
jnoortheen opened this issue Aug 7, 2020 · 1 comment
Closed

load nix.sh from ~/.profile and update XDG_DATA_DIRS #3910

jnoortheen opened this issue Aug 7, 2020 · 1 comment

Comments

@jnoortheen
Copy link

Is your feature request related to a problem? Please describe.
gui applications installed with nix do not appear in linux DE's launcher. The problem is answered here

Describe the solution you'd like
this is added by nix upon install.

if [ -e ~/.nix-profile/etc/profile.d/nix.sh ]
then 
	source ~/.nix-profile/etc/profile.d/nix.sh
fi # added by Nix installer

it is better to be put in ~/.profile so that gui apps will pickup the path variable changes. Also adding Nix's data folder to XDG_DATA_DIRS like mentioned in the answer will make things easier for newcomers.

export XDG_DATA_DIRS=$HOME/.nix-profile/share:"${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
@matthewbauer
Copy link
Member

matthewbauer commented Aug 11, 2020

/etc/profile and $HOME/.profile are not always loaded by the shell. Bash only loads /etc/bashrc and ~/.bashrc on non-login shells (although some systems source profile from those for you).

XDG_DATA_DIRS isn't added for fear of breaking the host system: #2443 (comment). It's not too hard to just add it yourself though.

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