How to change default shell to something like dash?
I tried this line:
environment.binsh = "${pkgs.dash}/bin/dash";
But, it doesn’t work.
How to change default shell to something like dash?
I tried this line:
environment.binsh = "${pkgs.dash}/bin/dash";
But, it doesn’t work.
users.users.<name>.shellusers.defaultUserShellenvironment.binsh is a footgun.{ pkgs, ... }:
{
environment.shells = [ pkgs.dash ];
users.defaultUserShell = pkgs.dash;
}
I built it with dash option but realpath $(which sh) command still returns bash.
In what environment? And did you reboot? I am not sure whether this has immediate effect or requires a reboot.
Though you really do not want to change this. Stuff will break!
For some fucking reason bash’ and dash’ sh are not compatible.
Exactly.
❯ nixos-rebuild repl -f ~/src/mine/nixnix -A lamorna.system
building Nix...
Nix 2.28.5
Type :? for help.
Loading installable 'lamorna.system'...
Added 6 variables.
nix-repl> :p options.environment.binsh.description
The shell executable that is linked system-wide to
`/bin/sh`. Please note that NixOS assumes all
over the place that shell to be Bash, so override the default
setting only if you know exactly what you're doing.
nix-repl> :p options.environment.binsh.visible
false
These are pretty strong hints that you want @FrdrCkII changes instead.