Closed zanculmarktum closed 2 years ago
It's at the end of /data/data/com.termux.nix/files/usr/usr/lib/login-inner
, and yes, it's not invoked as a login shell. Should it be?
Should it be?
Yeah, I guess since termux is supposed to be tty login screen IMO.
Anyway if you're not going to fix it, can you tell me how to make bash being invoked as login shell?
Passing -l
maybe?
I have no opinion on fixing it yet.
Yeah, you can try -l
. Will it prevent it from reading bashrc?
Can I make it permanent to /usr/lib/login-inner
?
Also I've noticed that it doesn't source /path/to/nix/profile/etc/bash_completion.d/*
either, probably because of the missing /etc/bashrc
(which sources it) which NixOS has it. But I think, this is Nix issue, since Nix (not NixOS) doesn't seem to have it.
You can fork this repository, change it in your fork and set the channel to point to your repository instead. Or just use a local checkout. Lots of other ways, probably.
Losing bashrc support and sensible defaults doesn't sound that great. What would be other benefits of switching to a login shell?
Not sure not shipping /etc/bashrc a Nix issue. Nix just provides bash.
What about introducing a new option called something like user.shellArgs
? You could add -l
in this array and use it in login-inner
.
For the bash_completion issue you could create a new module that creates a /etc/bashrc with the necessary content.
What would be other benefits of switching to a login shell?
Well, I have .bash_profile
sourcing .bashrc
so I get the same environment either I run shell from tty or terminal.
Not sure not shipping /etc/bashrc a Nix issue. Nix just provides bash.
Right, but isn't nix-on-droid supposed to be NixOS, not just Nix? It even has similar functionality to nixos-rebuild
.
Yeah, modules and options solve everything, but one-size-fits-all defaults are always better.
I think it would be better to start a login shell as this is this is the first process started in the nix-on-droid environment. And as termux uses a login shell, we should maybe stream-line it because this is probably the correct usage.
But I think it would be straight forward to add a module for writing /etc/bashrc
.
This should be fixed by via https://github.com/t184256/nix-on-droid/pull/139. Please reopen if this is still an issue.
I know I could use
.bashrc
, but why isn't.bash_profile
being loaded?The original Termux loaded the
.bash_profile
by the way.How was bash invoked in this version?