Skip to content
Snippets Groups Projects
  • Manav Rathi's avatar
    eec5409a
    installation: allow profile modification to be skipped (#1072) · eec5409a
    Manav Rathi authored
    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.
    eec5409a
    History
    installation: allow profile modification to be skipped (#1072)
    Manav Rathi authored
    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.