How to change the default shell in NixOS?
At the moment I need to set the fish shell to be my default shell on NixOS and there is no official documentation on how to do that declaratively (not by running chsh
) in NixOS.
In your configuration.nix
,
{ pkgs, ... }:
{
...
programs.fish.enable = true;
users.users.<myusername> = {
...
shell = pkgs.fish;
...
};
}
Followed by nixos-rebuild switch
.
More info in NixOS Wiki.