In ubuntu I had a ~/.bashrc
file with a number of aliases of the form
alias gs='git status'
How do I set an alias in nixos?
environment.interactiveShellInit = ''
alias gs='git status'
'';
More: https://nixos.org/manual/nixos/stable/options.html#opt-environment.interactiveShellInit
You can set programs.bash.shellAliases
in your global configuration:
programs.bash.shellAliases = {
l = "ls -alh";
ll = "ls -l";
ls = "ls --color=tty";
}
In general, one can search for configuration options at https://nixos.org/nixos/options.html