GithubHelp home page GithubHelp logo

Comments (10)

t184256 avatar t184256 commented on August 26, 2024

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?

from nix-on-droid.

zanculmarktum avatar zanculmarktum commented on August 26, 2024

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?

from nix-on-droid.

t184256 avatar t184256 commented on August 26, 2024

I have no opinion on fixing it yet.

Yeah, you can try -l. Will it prevent it from reading bashrc?

from nix-on-droid.

zanculmarktum avatar zanculmarktum commented on August 26, 2024

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.

from nix-on-droid.

t184256 avatar t184256 commented on August 26, 2024

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.

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

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.

from nix-on-droid.

zanculmarktum avatar zanculmarktum commented on August 26, 2024

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.

from nix-on-droid.

t184256 avatar t184256 commented on August 26, 2024

Yeah, modules and options solve everything, but one-size-fits-all defaults are always better.

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

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.

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

This should be fixed by via #139. Please reopen if this is still an issue.

from nix-on-droid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.