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

Don't modify dotfiles in $HOME without asking in the installer #1209

Open
hdgarrood opened this issue Jan 26, 2017 · 5 comments
Open

Don't modify dotfiles in $HOME without asking in the installer #1209

hdgarrood opened this issue Jan 26, 2017 · 5 comments
Assignees

Comments

@hdgarrood
Copy link

I noticed that the installer modifies ~/.profile without asking, which (IMO) is not good etiquette. For example, I prefer to keep my dotfiles under version control, and I've now added a bit of code to my dotfiles that adds Nix to the path when I want that to be the case. But now, whenever I install Nix on a new system, or even if I reinstall it on my current system, the installer will add the redundant extra line anyway.

In general I think that it's best to have people make any necessary changes to ~/.profile manually, because then they're more aware of what has actually happened, and so it's less likely that the system will behave in a surprising way because of modifications to these dotfiles, and also it's more likely that they will be able to fix it if it does start behaving in a surprising way.

Would you consider changing this behaviour so that it instead just prints the line that you need to add to .profile and lets you do it yourself?

@puffnfresh
Copy link
Contributor

Reinstalling shouldn't add an extra line, the installer does a check to make sure the line isn't present before adding it.

@hdgarrood
Copy link
Author

I guess the installer didn't notice in my case because I changed it to use $HOME rather than the full path to my home directory (I want my dotfiles to work across machines regardless of my username).

@hdgarrood
Copy link
Author

See also #555 (although I'm suggesting Nix basically do the exact opposite of what that suggests).

@issmirnov
Copy link

+1.

I would strongly appreciate a message at the end of the installation that explains where the various files live. I had to dig around on several issues before I learned about all the relevant details. Here's my suggested text to append to the install script, after Try it! Open a new terminal, and type and before Thank you for using this installer. If you have any feedback, don't hesitate. See https://github.com/NixOS/nix/blob/master/scripts/install-multi-user.sh#L255.

Important Information:
- Nix is installed to $NIX_ROOT
- Your user profile is at $HOME/.nix-profile
- The installer has updated $PROFILE_TARGETS with a call to load the nix daemon.
- If you are getting command not found errors, make sure that your '$PATH' contains $HOME/.nix-profile/bin

@stale
Copy link

stale bot commented Feb 15, 2021

I marked this as stale due to inactivity. → More info

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

No branches or pull requests

7 participants