LnL7 / nix-darwin

nix modules for darwin
MIT License
3.19k stars 457 forks source link

Uninstalling fails to restore the system's bashrc #911

Closed grahamc closed 1 week ago

grahamc commented 8 months ago

After installing then uninstalling nix-darwin today, I saw this in the uninstall log:

grep: /etc/bashrc: No such file or directory
Found no nix-daemon.sh reference in /etc/bashrc
add this snippet back to /etc/bashrc:

    # Nix
    if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
      . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
    fi
    # End Nix

this is a bit surprising, because while I don't have a bashrc, I do have bashrc.before-nix-darwin, but the uninstaller doesn't seem to put this file back.