In ubuntu I could place something like
export EDITOR=vim
in my .bashrc
file.
How do I do this in nixos?
The same thing should work in nixos, although variables such as EDITOR
should probably go in .profile
instead. .bashrc
is IIRC only sourced for interactive shells so variables exported there won't be available in programs started from your desktop environment menu.
You could also set environment.variables.VARIABLE = "VALUE";
in configuration.nix
but not really appropriate for personal variables such as EDITOR
. (ofc. if you're the only user it doesn't really matter that much)