Intro
dash is a pretty old but still more minimal shell. It is an alternative to bash.
It is purely POSIX-compliant, while bash uses some extra functions and syntax (“bashisms”) which break when using dash.
Dash can offer some security benefits due to being more minimal, and script execution is way faster.
Issues
When just setting the default shell to dash, the entry in /etc/shells is missing (unlike with zsh or fish).
Programs like input-remapper will not launch because of that.
Solution
Here are all config lines you need to use dash
# dash instead of bash
users = {
defaultUserShell = pkgs.dash;
users.root.shell = pkgs.dash;
};
# fix the mentioned issue
environment.shells = with pkgs; [
dash
];
# do this for all configured users
users.users.user = {
...
useDefaultShell = true;
};