Noshell: user-configurable login shell

Hi! I created a very simple C shim that loads the login shell for a user from ~/.config/shell. This allows for some patterns in Nix/NixOS:

  • User-level installation of the shell with home-manager + xdg.configFile."shell".source
  • Using wrapped shells, that are not part of /etc/shells, like a wrapped shell from wrapper-manager

Enjoy, and please report any bugs

20 Likes

You just keep delivering amazing projects, good job!

1 Like

That seems to be a solution to allow home manager to manage the shell.

Are there security considerations one needs to be aware of?

1 Like

I don’t know. Probably the same attack surface as having your .bashrc modified

I think it could be worse. Since this could subtly change the login shell which gets executed on login it could potentially be hard to find and could do pretty much anything the user has access to. So a persistence vector for any malicious scripts.

2 Likes

I don’t see how that’s any different to modifying your .bashrc

Edit: also, I’d prefer you keep the conversation in github issues