21

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.

Sridhar Ratnakumar
  • 883
  • 1
  • 7
  • 17

1 Answers1

33

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.

Sridhar Ratnakumar
  • 883
  • 1
  • 7
  • 17