Hello!
I am struggling to set the correct default shell using nix-darwin. When I open the terminal and run echo $SHELL it points to the system-wide shell at /run/current-system/sw/bin/bash, however I want my default shell to point to the user-specific instance at /etc/profiles/per-user/holdenc/bin/bash. Interestingly which bash gives /etc/profiles/per-user/holdenc/bin/bash, which is the shell that I want.
The relevant parts of my Darwin-managed configuration.nix are here:
programs.bash.enable = true;
users.users.holdenc.shell = pkgs.bash;
environment.shells = [ pkgs.bash ];
I’m not that clear on the implementation specifics of these commands. I would have thought that users.users.holdenc.shell = pkgs.bash; would set a user-specific shell, but it appears not to.
I have temporarily fixed this by adding /etc/profiles/per-user/holdenc/bin/bash to my available shells in /etc/shells and running chsh -s /etc/profiles/per-user/holdenc/bin/bash, but it’s not a very nix-y solution!
Many thanks for any help / discussion.