about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorManav Rathi <mx4492@gmail.com>2016-11-03T17·02+0530
committerDomen Kožar <domen@dev.si>2016-11-03T17·02+0100
commiteec5409a69054cf21214c3f5846ec0310fcb8228 (patch)
tree94ea1252280cbf32ebfe81d3a95e00f1e81fc37a /doc
parent18b7363a699c0b5a4bf59d2b320dfc2b84dc4e67 (diff)
installation: allow profile modification to be skipped (#1072)
The current behaviour modifies the first writeable file from amongst
.bash_profile, .bash_login and .profile.  So .bash_profile (if it is
writable) would be modified even if a user has already sourced nix.sh
in, say, .profile.

This commit introduces a new environment variable,
NIX_INSTALLER_NO_MODIFY_PROFILE.  If this is set during installation,
then the modifications are unconditionally skipped.

This is useful for users who have a manually curated set of dotfiles
that they are porting to a new machine. In such scenarios, nix.sh is
already sourced at a place where the user prefers.  Without this
change, the nix installer would insist on modifying .bash_profile if
it exists.

This commit also add documentations for both the current behaviour and
the new override.
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/installation/installing-binary.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/manual/installation/installing-binary.xml b/doc/manual/installation/installing-binary.xml
index da54e2bedd6f..2a9beec98c9b 100644
--- a/doc/manual/installation/installing-binary.xml
+++ b/doc/manual/installation/installing-binary.xml
@@ -26,6 +26,14 @@ $ mkdir /nix
 $ chown alice /nix
 </screen>
 
+The install script will modify the first writable file from amongst
+<filename>.bash_profile</filename>, <filename>.bash_login</filename>
+and <filename>.profile</filename> to source
+<filename>~/.nix-profile/etc/profile.d/nix.sh</filename>. You can set
+the <command>NIX_INSTALLER_NO_MODIFY_PROFILE</command> environment
+variable before executing the install script to disable this
+behaviour.
+
 </para>
 
 <!--