nix-community / nix-on-droid Goto Github PK
View Code? Open in Web Editor NEWNix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
Home Page: https://nix-on-droid.unboiled.info
License: MIT License
Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
Home Page: https://nix-on-droid.unboiled.info
License: MIT License
Give the user the possibility to change the default shell. Changing the value in /etc/passwd
is not enough, nix-on-droid-app needs to reads this value.
I have installed nixpkgs.xorg
, nixpkgs.xwaayland
, nixpkgs.openbox
and nixpkgs-unstable.tightvnc
, and export DISPLAY=":1"
but get
bash-4.4$ vncserver -localhosh
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). vncserver: couldn't find "Xvnc" on your PATH.
when running vncserver
.
So I still have difficulty getting a gui.
Enable configuration of host name in nix-on-droid config.
I tried to achieve this with #45 but that didn't work.
bash-4.4$
bash-4.4$ ls .em*
ls: cannot access '.em*': No such file or directory
bash-4.4$ emacs
Results in:
Error (initialization): User u0_a211 has no home directory
You can get past it with:
emacs --load emacs-config/init.el --user ''
Maybe there is a better solution?
It would be great to allow modifying $NIX_PATH
in a way consistent with the other nix tools.
This is a fresh install from f-droid version 0.66_v0.2.2_nix, Android 7.1.2 LineageOS 14.1. The bootstrap installed fine.
For example nix-env -qa dnsutils
returns error: selector 'dnsutils' matches no derivations
nix search dnsutils
returns error: executing '': No such file or directory
Trying to open /data/data/com.termux.nix/files/usr/usr/lib/login-inner with a file manager returns a file not found error (tried with Amaze internal text editor and Quickedit).
Currently DNS servers are set to 1.1.1.1
and 8.8.8.8
and that will cause problems with networks that block them. DNS settings should be picked up from Android, ideally with VPN support and runtime changes. I have no idea how to implement this at the moment.
I installed home-manager and I set programs.starship.enable = true;
which should add stuff to .bashrc but I don't seem to have one.
i can't get home manager to install on any devices, i have tried it on 6 devices so far
hauwei mate SE
google pixel
samsung tab S
samsung s6, s7
hauwei media pad
samsung note 4
its all the same error, i will attach an image because select all doesn't work on this lovely little app and it files i write in nix-on-droid are for some reason impossible to find on android (thanks for that)
I've attached images of it
There will be no further complaints from me here, this is broken garbage and i wish you the best of luck fixing it
uninstalled thanks
I am trying to follow https://github.com/t184256/nix-on-droid/wiki/SSH-access
When I do ssh-copy-id
nix run nixpkgs.openssh -c ssh-copy-id -p 8022 -i ~/.ssh/phone nix-on-droid@<ip>
from my remote machine while running
nix run nixpkgs.openssh -c /nix/store/(...)/bin/sshd -f sshd_config_local -ddd
on the phone (nix-on-droid) I am getting
/nix/store/wdbg7kyylmvg48w0wklrjdhvgya4lcgi-openssh-8.2p1/bin/ssh-copy-id: ERROR: ssh: connect to host port 8022: Connection refused
I had to run the following in order to run the previous command
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
When I'm trying
nix run nixpkgs.openssh -c ssh -p 8022 -i ~/.ssh/phone -l nix-on-droid <ip>
I am getting
nix-on-droid@'s password:
My question would be is there a password for nix-on-droid user ?
As we recently introduced an overlay for htop and I think that there will be many overlays created in the future (see termux packages and their patches), we should think about a build environment which will push the built packages to cachix.
We could use aarch64 build machine like those provided by travis-ci or github workflow to build these packages. Or we could consider using a custom android phone as build machine via hercules-ci or github workflow self-hosted runner or anything with a matching architecture if there are any compatibility issues between aarch64 machines and the android/bionic env. Maybe there are other options to automate this.
In the htop overlay I pinned the nixpkgs version. This provides us with the possibility to update the pinned version, build and push all packages and only on success commit and push the new rev of the nixpkgs version. This could be easily automated with github workflow for example.
My main intention behind all of this is to prevent (re)builds on client devices but also to update the pinned nixpkgs version regularly to prevent outdated packages.
What do you think? Are there any problems I missed out?
I think many packages need to be compiled on my phone when I update. I takes a while and use my battery.
Anyone uses a remote builder? I wonder how to set up a remote builder using qemu to build the aarch64 packages for android on my x86_64 machine.
Warning: no reproduction yet
[ ] - bisect packages to identify package triggering paths.c
[ ] - create minimal repro with emacs -Q
Using my quite large emacs config i get the following error.
./path/path.c:547: Comparison compare_paths2(const char *, size_t, const char *, size_t): assertion "length2 > 0" failed
proot warning: signal 6 received from process 5597
Putting this here in this pre repro state in case others want to see state of emacs support or someone recognizes that error.
I'll debug this further as time allows.
For full management of the system and smooth upgrade path that was laid out in #18 we should also manage proot with nix and make it buildable on-device (and cache the result so that the users won't actually have to do that). Ironically, now it's easier to cross-compile that to native-compile it, as it has to be linked with bionic.
Maybe it'd be acceptable to just ape the build environment from termux and use LLVM. Maybe not.
Failed to install file:
Application package com.termux not found
Failed to install file:
Cannot create termux dir=/data/user/0/com.termux/files/home/.termux
I want to begin by saying thanks for the project! I'm a big nixos fan and having it's features be available on android is quite nice. If you're curious I found the project after seeing your nixcon talk.
I'm wondering if it's inside the scope of the project to support some of the addons? More specifically termux-boot and termuxlauncher (which unfortunately has no licence so may have to be a clean room implementation (which may or may not take further inspiration from TUI) unless the creator sets a real licence.)
If you were willing to setup an organisation I'd be happy to put in some effort figuring it out myself. I'd also be interested in having a nix config for android, with the end goal of being able to carry around most of the state of an android system without root and playing by android's rules.
Installing home-manager...
GC Warning: Couldn't read /proc/stat
GC Warning: Couldn't read /proc/stat
these derivations will be built:
/nix/store/6n2w6f1g3rsdrlwl1pbfnxpp9qwrqazb-home-manager.drv
GC Warning: Couldn't read /proc/stat
building '/nix/store/6n2w6f1g3rsdrlwl1pbfnxpp9qwrqazb-home-manager.drv'...
/nix/store/v262b100wnfjhyxjv5bk2zachznf3147-stdenv-linux/setup: line 1259: 24434 Bus error install -v -D -m755 /nix/store/3a2whifgkajbm618v1xx94j8llbm199a-home-manager $out/bin/home-manager
builder for '/nix/store/6n2w6f1g3rsdrlwl1pbfnxpp9qwrqazb-home-manager.drv' failed with exit code 135
error: build of '/nix/store/6n2w6f1g3rsdrlwl1pbfnxpp9qwrqazb-home-manager.drv' failed
ptrace on relevant line:
proot warning: ptrace request 'PTRACE_???' not supported yet
execve("/nix/store/cib5daqwbsbk6009r7pcpkd0snsf8brx-coreutils-8.30/bin/install", ["install", "/nix/store/3a2whifgkajbm618v1xx9"..., "/nix/store/szbfi2pknmdhr5xw5769k"...], 0x7fffffe540 /* 66 vars */) = 0
brk(NULL) = 0x561000
faccessat(AT_FDCWD, "/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/tls/aarch64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/tls/aarch64", 0x7fffffd5d0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/tls/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/tls", 0x7fffffd5d0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/aarch64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/aarch64", 0x7fffffd5d0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/tls/aarch64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/tls/aarch64", 0x7fffffd5d0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/tls/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/tls", 0x7fffffd5d0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/aarch64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/aarch64", 0x7fffffd5d0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/nix/store/m6bmjrz6zqp95qaj2jimyqyq65azis8v-glibc-2.27/lib/tls/aarch64/librt.so.1", O
_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/m6bmjrz6zqp95qaj2jimyqyq65azis8v-glibc-2.27/lib/tls/aarch64", 0x7fffffd5d0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/m6bmjrz6zqp95qaj2jimyqyq65azis8v-glibc-2.27/lib/tls/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/m6bmjrz6zqp95qaj2jimyqyq65azis8v-glibc-2.27/lib/tls", 0x7fffffd5d0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/m6bmjrz6zqp95qaj2jimyqyq65azis8v-glibc-2.27/lib/aarch64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/m6bmjrz6zqp95qaj2jimyqyq65azis8v-glibc-2.27/lib/aarch64", 0x7fffffd5d0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/m6bmjrz6zqp95qaj2jimyqyq65azis8v-glibc-2.27/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0000\36\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=37464, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb7ffd000
mmap(NULL, 90464, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb7fe6000
mprotect(0x7fb7fec000, 61440, PROT_NONE) = 0
mmap(0x7fb7ffb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7fb7ffb000
close(3) = 0
openat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/m6bmjrz6zqp95qaj2jimyqyq65azis8v-glibc-2.27/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\360\\\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=138776, ...}) = 0
mmap(NULL, 180680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb7fb9000
mprotect(0x7fb7fd0000, 65536, PROT_NONE) = 0
mmap(0x7fb7fe0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fb7fe0000
mmap(0x7fb7fe2000, 12744, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fb7fe2000
close(3) = 0
openat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/libacl.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0\37\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=38688, ...}) = 0
mmap(NULL, 94320, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb7fa1000
mprotect(0x7fb7fa8000, 61440, PROT_NONE) = 0
mmap(0x7fb7fb7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fb7fb7000
close(3) = 0
openat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/libattr.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\240\27\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=23400, ...}) = 0
mmap(NULL, 81944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb7f8c000
mprotect(0x7fb7f90000, 61440, PROT_NONE) = 0
mmap(0x7fb7f9f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fb7f9f000
close(3) = 0
openat(AT_FDCWD, "/nix/store/lf7vr1lrzs8nnclhl85gl502sa17cb0b-acl-2.2.53/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/2ddlh6qy4qgzcdlh3lj44ynrbivr59fj-attr-2.4.48/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/m6bmjrz6zqp95qaj2jimyqyq65azis8v-glibc-2.27/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\350\10\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=1590536, ...}) = 0
mmap(NULL, 1377136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb7e3b000
mprotect(0x7fb7f72000, 65536, PROT_NONE) = 0
mmap(0x7fb7f82000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x137000) = 0x7fb7f82000
mmap(0x7fb7f88000, 13168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fb7f88000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb7e39000
mprotect(0x7fb7f82000, 16384, PROT_READ) = 0
mprotect(0x7fb7f9f000, 4096, PROT_READ) = 0
mprotect(0x7fb7fb7000, 4096, PROT_READ) = 0
mprotect(0x7fb7fe0000, 4096, PROT_READ) = 0
mprotect(0x7fb7ffb000, 4096, PROT_READ) = 0
mprotect(0x53c000, 45056, PROT_READ) = 0
mprotect(0x3f0002c000, 4096, PROT_READ) = 0
set_tid_address(0x7fb7e39750) = 13268
set_robust_list(0x7fb7e39760, 24) = -1 ENOSYS (Function not implemented)
rt_sigaction(SIGRTMIN, {sa_handler=0x7fb7fbe750, sa_mask=[], sa_flags=SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7fb7fbe840, sa_mask=[], sa_flags=SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
prctl(PR_SET_NAME, "install") = 0
prctl(PR_SET_KEEPCAPS, 549755807983) = -1 EINVAL (Invalid argument)
brk(NULL) = 0x561000
brk(0x582000) = 0x582000
geteuid() = 10099
umask(000) = 022
newfstatat(AT_FDCWD, "/nix/store/szbfi2pknmdhr5xw5769kir8lwwdg8b2-home-manager/bin/home-manager", 0x7fffffe2f8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/3a2whifgkajbm618v1xx94j8llbm199a-home-manager", {st_mode=S_IFREG|0444, st_size=12499, ...}, 0) = 0
newfstatat(AT_FDCWD, "/nix/store/szbfi2pknmdhr5xw5769kir8lwwdg8b2-home-manager/bin/home-manager", 0x7fffffde48, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/3a2whifgkajbm618v1xx94j8llbm199a-home-manager", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=12499, ...}) = 0
openat(AT_FDCWD, "/nix/store/szbfi2pknmdhr5xw5769kir8lwwdg8b2-home-manager/bin/home-manager", O_WRONLY|O_CREAT|O_EXCL, 0600) = 4
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb7e17000
read(3, "#!@bash@/bin/bash\n\n# Prepare to "..., 131072) = 12499
write(4, "#!@bash@/bin/bash\n\n# Prepare to "..., 12499) = 12499
read(3, "", 131072) = 0
fsetxattr(-95, "system.posix_acl_access", "\2\0\0\0\1\0\6\0\377\377\377\377\4\0\0\0\377\377\377\377 \0\0\0\377\377\377\377", 28, 0) = 4
fchmod(0, 0600) = 4
close(0) = 3
close(0) = 548545851392
munmap(NULL, 139264) = -1 ENETDOWN (Network is down)
fchmodat(-2, "/nix/store/szbfi2pknmdhr5xw5769kir8lwwdg8b2-home-manager/bin/home-manager", 0755 <unfinished ...>
--- SIGBUS {si_signo=SIGBUS, si_code=BUS_ADRALN, si_addr=0x7fb7e68008} ---
<... fchmodat resumed>) = ?
+++ killed by SIGBUS +++
Device: Xiaomi Redmi 4X, LineageOS 15.1-20181114-NIGHTLY-santoni
Currently the only way to run something as root known to me is running su
in the failsafe shell and executing /data/data/com.termux.nix/files/usr/bin/login <command>
. There should be a way to do that from within the Nix environment.
Samsung ARM64 devices with 2GB of RAM and lower run using a 32-bit Android userspace but an AArch64 kernel.
That includes the Galaxy A10, released in 2019 on Android 9, despite using a Cortex-A73.
In that case, statically linked binaries work just fine, so proot would have to be statically linked for aarch64 and the package to be marked as armv7 compatible...
Hey, in the last weeks I was trying to build service-like modules, e.g. an sshd service that will execute some commands before starting like generating a host key and start the sshd daemon. To stop it, you have to kill the process, which needs to be done on exiting the app, if not it will run in the background.
Similar problem with ssh-agent
, the agent will not be killed on exiting the app.
Of course one could define for these commands services and let login-inner stop all running services on app exit, but this is not really error-prone.
That is why I thought of something like an init daemon, so that all processes started will be killed, when killing the init daemon.
Thats all I have for now. What do you thing? Have you another/a better idea?
We should provide a home-manager module to configure the installation.
Some values configurable through the home-manager installation could be user or group name. Furthermore we could write the files in /bin
, /etc
and /usr
via home-manager and uninstall the basic-environment
. That way we would not need to rely on the fragile nix-on-droid-linker
thing.
This is the error i get on oneplus 6t
Creating /etc/passwd...
sh: xmalloc: shell.c:1709: cannot allocate 43 bytes (0 bytes allocated)
[Process completed (code 2) - press Enter]
It's running Android 9 with oxygen 9.0.11
adb doesn't give us access to com.termux.nix
right?
I know I could use openssh but it didn't work well with emacs tramp.
Right now I'm using openssh with scp.
I wonder if someone has a neat approach for this.
$subj
Guix is a functional package manager like Nix. I wonder if this app could run it as well?
Description: http://guix.gnu.org/
Installing it on existing distros: https://guix.gnu.org/manual/en/html_node/Binary-Installation.html
A way to do it with root and adb: https://guix.gnu.org/blog/2018/guix-on-android/
Installation of bootstrap zipball fails on the first stage, during downloading. According to the traffic data, it downloads around 5 KB, then stops with the brief pop-up message about error.
My tablet with MT8735A definitely 64-bit and fit to launch Nix - I had a fully working installation with nix-in-termux script.
How do I fix this problem or at least collect more information about it?
When stuff becomes configurable, allow the user to specify a timezone.
Activating linkBinSh
Activating linkUsrBinEnv
Activating installLogin
Activating installLoginInner
Activating installPackages
GC Warning: Couldn't read /proc/stat
replacing old 'nix-on-droid-path'
installing 'nix-on-droid-path'
Activating installProotStatic
Activating setUpEtc
Activating homeManager
Starting home manager activation
GC Warning: Couldn't read /proc/stat
GC Warning: Couldn't read /proc/stat
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
GC Warning: Couldn't read /proc/stat
installing 'home-manager-path'
building '/nix/store/1w8d8qzqzcrfnbjk1879lg7abai7gznm-user-environment.drv'...
error: packages '/nix/store/yvr7hjdxj1b5jcjk3pgh9z4gmwn78lql-home-manager-path/etc/man_db.conf' and '/nix/store/naig9qc4bmx1gp4nmsmxwmnllx0cjlvc-nix-on-droid-path/etc/man_db.conf' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority)
builder for '/nix/store/1w8d8qzqzcrfnbjk1879lg7abai7gznm-user-environment.drv' failed with exit code 1
error: build of '/nix/store/1w8d8qzqzcrfnbjk1879lg7abai7gznm-user-environment.drv' failed
"aarch64-linux"
Linux 4.4.200-g122700c1790b
no
no
nix-env (Nix) 2.3.5
"home-manager-20.03, nix-on-droid-20.03, nixpkgs-20.03.2015.e7752db2fb6"
/data/data/com.termux.nix/files/home/.nix-defexpr/channels/nixpkgs
@Gerschtli, could you please take a look?
$ nix-env --version
nix-env (Nix) 2.0.4
$ nix-instantiate --eval -E 'with import <nixpkgs> {}; lib.version or lib.nixpkgsVersion'
error: evaluation aborted with the following error message: '
This version of Nixpkgs requires Nix >= 2.2, please upgrade:
- If you are running NixOS, `nixos-rebuild' can be used to upgrade your system.
(https://travis-ci.org/github/t184256/nix-on-droid/builds/697755958)
Hey,
I want to come up with a solution for configuring nix-on-droid with or without home-manager. I came up with multiple solutions and want to hear your opinions about it, before I implement any of them.
I prototyped a minimal version, where I am able to set options in ~/.config/nixpkgs/config.nix
like this:
{
nix-on-droid = {
# entry point for nix-on-droid module system
test = "abc";
};
}
Note: It's possible and my preferred option to define a separate config file like ~/.config/nixpkgs/nix-on-droid.nix
. This way we get better error messages (prints path to file) and we have similar config files to the ones in nixos and home-manager. Example:
# entry point for nix-on-droid module system
{
test = "abc";
}
The implementation of this module could look like this:
{ config, lib, pkgs, ... }:
with lib;
{
options = {
test = mkOption {
type = types.str;
default = "default value test";
description = "Internal option";
};
test2 = mkOption {
type = types.str;
default = "default value test2";
description = "Internal option2";
};
};
config = {
nix-on-droid.packages = [
(pkgs.writeTextDir "testfile" ''
test: ${config.test}
test2: ${config.test2}
'')
];
};
}
With this way we could replace the static list of packages in default.nix
in basic-environment
with the merged nix-on-droid.packages
list. The nix-on-droid-linker
has to be called after every change and needs to remove old links.
Instead of the nix-on-droid.packages
list and the fragile nix-on-droid-linker
setup, we could provide an executable similar to home-manager
script.
The only results of possible nix-on-droid options and configs I can think of is managing /data/data/com.termux.nix/files/usr
directory. Therefore I recommend implementing something like environment.etc
in nixos (https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/system/etc) for just this directory. This should be fairly easy to implement, provides atomic upgrades and removes old files. With this implementation we also don't need this basic-environment
anymore.
Concerning the integration with home-manager, refactoring the home.file
option for our case could be a possible solution but this would mean we have to support both ways which are conflicting a bit. The better solution would be, if we could inject our activation script logic (linking etc like environment.etc
) in the one of home-manager, but currently there isn't any option. We would need something like that: nix-community/home-manager#779.
I would say it's save enough to try the custom module system and custom nix-on-droid
activator script and ignore the home-manager integration for now. home-manager would still work perfectly fine with this solution, the user just has to manage to config files until we get a better solution.
What do you say?
Unfortunately my attempts for naively cross-compiling static-linked proot as pkgsCross.armv7a-android-prebuilt.pkgsStatic.proot
or pkgsCross.aarch64-multiplatform.pkgsStatic.proot
failed: the produced binaries crashed with the dreaded bus error that I don't know how to debug, so I resorted to building proot manually for now.
This may be a desperate shot in the dark, but when I type 'cross-compiling static-linked... with nix`, there's a name that rings inside my head and this name is @matthewbauer. Matthew, if you have a minute, do you have any insights on why could that produce a binary that crashes with 'Bus error'? Have you tried combining crossSystem and pkgsStatic?
when i run home setup, it states its installed core utils
but i cannot use any coreutrils, grep, which, sed, etc are not found
and there is 0 documentation to speak of so can i please get some answers im trying to setup x11
Hello,
I was wondering, will nixos/nix-on-droid be effected by the minimum sdk / android 10 issue (as termux will be) in a few months from now?
I am looking for a backup to termux, that won't end up broken when this api cutoff deadline occurs (in November 2020 I think). I am rooted and on a custom rom, if that makes any difference.
Really hope this will possibly be a good alternative, and if it's uneffected I wonder if the creator of this could figure out with the termux dev how to fix the issue (there gonna use apks instead of packages or something, sounds a bit messy). I know they were taking about using proot and other things like that, so maybe that could end up being a potential collaboration.. who knows :-)
Thanks!
We've dropped
{
# Fix locale (perl apps panic without it)
home.sessionVariables = {
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
};
}
This should be reinstated somehow somewhere.
It'd be nice to be able to access the Nix/Termux shell remotely. Can you add instructions how to do so?
It's very easy on Termux, but simply installing nix-env -iA nixpkgs.openssh
then running sshd
doesn't work out of the box.
https://wiki.termux.com/wiki/Remote_Access
Hello, I'm trying to run nix on my Android 6 machine. Bootstrap downloaded succesfully. But I'm stuck on first update of the nix-channels. Read somewhere it probably has something to do with https, so I edited the .nix-channels from failsafe. But apparently after I closed the failsafe the content of .nix-channels is reverted back to before I edited it.
I'm new with nix so I kinda clueless. What can I do to fix this?
Thank you.
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?
I use nix-env -i ghc
to install GHC. However, when compiling Distribution.SPDX.LIcenseId
, I get the following error:
[123 of 270] Compiling Distribution.SPDX.LicenseId ( libraries/Cabal/Cabal/Distribution/SPDX/LicenseId.hs, bootstrapping/Distribution/SPDX/LicenseId.o )
utils/genprimopcode/ghc.mk:19: utils/genprimopcode/dist/package-data.mk: No such file or directory
make[1]: *** [utils/ghc-cabal/ghc.mk:56: utils/ghc-cabal/dist/build/tmp/ghc-cabal] Killed
make: *** [Makefile:123: all] Error 2
error (ignored): getting status of '/data/data/com.termux.nix/files/usr/tmp/nix-build-ghc-8.6.4.drv-1/ghc-8.6.4/utils/unlit/fs.c': Operation not permitted
error: cannot unlink '/data/data/com.termux.nix/files/usr/tmp/nix-build-ghc-8.6.4.drv-1/ghc-8.6.4/utils/fs': Directory not empty
I have no idea why this happens and whether it is related to Nix-on-droid or just to GHC.
Could you take some time to look into it when you are free? Thanks!
My android version is 7.1.1
I would like to have a auto-generated list of all available options, similar to home-manager's html page or as output of man nix-on-droid
.
I'm open for ideas where and how to implement this.
Note: This is an issue probably with the app itself, but as the fork doesn't have issues open, I can't report it.
Shortcuts (termux-widget code) doesn't seem to work; Big widget crashes the app on click, small widget does nothing or opens the current Nix session.
not sure if related to #8
I tried to install 'exa' with home-manager. I get those error.
The weird thing is that if I run home-manager switch
again I don't have any errors but I can't run the exa
command. I get command not found
.
Do I need the storage permission for this or is the permission only so I can access my phone's file from Nix?
first home-manager run:
GC Warning: Couldn't read /proc/stat
GC Warning: Couldn't read /proc/stat
these derivations will be built:
/nix/store/06fi3aigs1wlbbbd3b4q6hfg7nly33ka-exa-0.8.0.drv
/nix/store/pqchpgln0fakk3qpqavim71la1617qzc-home-manager-path.drv
/nix/store/hz5c6218yf1k6px4zb3xa6g02j10gd4m-activation-script.drv
/nix/store/2175bk5bi1bv4lpldc4h9d5a2bkny7sy-home-manager-generation.drv
these paths will be fetched (152.90 MiB download, 601.26 MiB unpacked):
/nix/store/088br4d3rk7lhpxnpfrifkhsk1f1ahbn-pkg-config-0.29.2
/nix/store/0amchd0rpnarzvgrcarpxad8kly85ic5-perl5.28.1-HTTP-Date-6.02
/nix/store/0dyywz80hkkndj6bighqq392ppszy7sf-perl5.28.1-Encode-Locale-1.05
/nix/store/133di3cs8b8gbcg1850rdiffafwjr3lx-python-2.7.16
/nix/store/2gvf6yxkzkd0mi0yss69dl56vhawv9lh-llvm-7.0.1-lib
/nix/store/2v9zmq2nqygqk1sh0a29420na6ws55qs-gdbm-1.18.1
/nix/store/380glr4r5jyhb6pk6kmdvivpnrpx37yi-openssh-7.9p1
/nix/store/3wrcg1zy6k70pvf4dma3xv5h1kgqjxb1-gcc-wrapper-7.4.0
/nix/store/4gr9c2161slg0x5r3lwqmkajb2da25rb-expat-2.2.6
/nix/store/50792v9mrzxja3cc4s3i7h2bcd0brb7z-perl5.28.1-Test-RequiresInternet-0.05
/nix/store/53cms7ayg0hdm46g9g89dc5xzavvb8c6-git-2.19.2
/nix/store/5d2pwfgk42p3knphm7rmcmqi79iazfyq-perl5.28.1-HTTP-Daemon-6.01
/nix/store/5qj51mzplnxdfra88fxj7q0k5ki4r68a-binutils-2.31.1
/nix/store/6dc1i53b00gqdp6mvav4f574admb38fl-linux-headers-4.19.16
/nix/store/6l7v4g34mx6ycp1r3n46cgbimxf3m259-perl5.28.1-URI-1.74
/nix/store/7a21rfc96j21bwnlfkjsz5zd8nc2xw9j-exa-0.8.0-vendor
/nix/store/84q5kyffv30hbw80ywh05m4b18s0vhza-zlib-1.2.11-dev
/nix/store/8ad1hjyd8464l74q2qn64sh6dzlzgkdq-rhash-1.3.8
/nix/store/8k2szzqh9na9w64akfbyhxhw0nr4nw2z-perl5.28.1-libwww-perl-6.36
/nix/store/8mkrm2kxv7zz02zza3xd33ldm6b0wiy7-perl5.28.1-HTML-Parser-3.72
/nix/store/93c3l5pdxnmnrq8ryh0jaln7npp343ip-gcc-7.4.0
/nix/store/9lqrs6ii8nzq58j62slwgmp6mmg9kyff-glibc-2.27-dev
/nix/store/ab4nnspb6f8imn7wyxgrc3gy0i1cmdpc-expand-response-params
/nix/store/b5j3wy8j2hvlhkh7zyy0fcxha9m5xkaq-stdenv-linux
/nix/store/bqlj9j4pg202nafdjdy7chyrwf18myhr-libedit-20180525-3.1
/nix/store/cy9k6b706yixdg6jwh4az9wr846dqnjk-perl5.28.1-Test-Needs-0.002005
/nix/store/f8al0sbbbscxvq5xm6vqi2i086msbp4q-perl5.28.1-File-Listing-6.04
/nix/store/fqwsi5mhrl6568c1rfx1jl8vxnvbvnvz-source
/nix/store/fz4iksqmxv9dz096b7gbsbzw4sb47rf3-libgit2-0.26.6
/nix/store/hyi769dbhf8p8sx70gnrpsamil6pb0qx-cmake-3.13.4
/nix/store/iki0dvhrw9nvj1pmka9z0z4332r76ya4-readline-6.3p08
/nix/store/jpajm1g87vmdbcslwf3n82phcq7xdhdq-gettext-0.19.8.1
/nix/store/kfqsff3308ra0dbh3aig9xg9gv182spw-perl5.28.1-HTTP-Cookies-6.04
/nix/store/kwgwvh7gr1xv56nfkjd3mpwcrx1vddky-libarchive-3.3.3-lib
/nix/store/q9bm3i7zlxjmdv469spb6cma5cfih0ls-perl5.28.1-Test-Fatal-0.014
/nix/store/qlgnvv94qba9c7zi3bif04z730k5pwgs-perl5.28.1-IO-HTML-1.001
/nix/store/r047a4brgc5yh9wdh63kxp0hhsx1y5xl-http-parser-2.9.0
/nix/store/r1f6kq7pj7qgi6hs7jqzdi784r0qjlz5-binutils-wrapper-2.31.1
/nix/store/ryq0pzfqdpjbzx9vxqyavw76zssrac7i-rustc-1.32.0
/nix/store/sfmn4jykwrf9fgsahrmy28ww0hgd3lv2-perl5.28.1-TermReadKey-2.37
/nix/store/sl99nsf27mgfmigcnbh1nxkyvzjvmvg1-perl5.28.1-HTML-Tagset-3.20
/nix/store/vj0mnryjvfcv8302wrdrxmda8da9kc46-libuv-1.26.0
/nix/store/vyx4da3sk0jnybbks1717rklvv0zd659-perl5.28.1-Try-Tiny-0.30
/nix/store/w56xmk58q44czl33jn9gl5f310ff1akc-perl5.28.1-WWW-RobotRules-6.02
/nix/store/x90hsr3ww113rz0658w6ay3rvlgmp5y3-perl5.28.1-Net-HTTP-6.18
/nix/store/xk02njxh2v1hvqpvwp3i91yrk5q06wfw-perl5.28.1-HTTP-Message-6.18
/nix/store/ynxlmwlhczm5y4i2qwxjj3xw00nfxdiy-perl5.28.1-HTTP-Negotiate-6.01
/nix/store/zc9zvgjig6mnccwbavx8kyrb5yzg7ns3-cargo-1.32.0
/nix/store/zg2w3viqsc8cxpfwjaqif8jqfn6gcjn3-perl5.28.1-LWP-MediaTypes-6.02
copying path '/nix/store/7a21rfc96j21bwnlfkjsz5zd8nc2xw9j-exa-0.8.0-vendor' from 'https://cache.nixos.org'...
copying path '/nix/store/5qj51mzplnxdfra88fxj7q0k5ki4r68a-binutils-2.31.1' from 'https://cache.nixos.org'...
copying path '/nix/store/ab4nnspb6f8imn7wyxgrc3gy0i1cmdpc-expand-response-params' from 'https://cache.nixos.org'...
copying path '/nix/store/4gr9c2161slg0x5r3lwqmkajb2da25rb-expat-2.2.6' from 'https://cache.nixos.org'...
copying path '/nix/store/2v9zmq2nqygqk1sh0a29420na6ws55qs-gdbm-1.18.1' from 'https://cache.nixos.org'...
copying path '/nix/store/jpajm1g87vmdbcslwf3n82phcq7xdhdq-gettext-0.19.8.1' from 'https://cache.nixos.org'...
copying path '/nix/store/r047a4brgc5yh9wdh63kxp0hhsx1y5xl-http-parser-2.9.0' from 'https://cache.nixos.org'...
copying path '/nix/store/kwgwvh7gr1xv56nfkjd3mpwcrx1vddky-libarchive-3.3.3-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/bqlj9j4pg202nafdjdy7chyrwf18myhr-libedit-20180525-3.1' from 'https://cache.nixos.org'...
copying path '/nix/store/fz4iksqmxv9dz096b7gbsbzw4sb47rf3-libgit2-0.26.6' from 'https://cache.nixos.org'...
copying path '/nix/store/vj0mnryjvfcv8302wrdrxmda8da9kc46-libuv-1.26.0' from 'https://cache.nixos.org'...
copying path '/nix/store/6dc1i53b00gqdp6mvav4f574admb38fl-linux-headers-4.19.16' from 'https://cache.nixos.org'...
copying path '/nix/store/2gvf6yxkzkd0mi0yss69dl56vhawv9lh-llvm-7.0.1-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/9lqrs6ii8nzq58j62slwgmp6mmg9kyff-glibc-2.27-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/380glr4r5jyhb6pk6kmdvivpnrpx37yi-openssh-7.9p1' from 'https://cache.nixos.org'...
copying path '/nix/store/r1f6kq7pj7qgi6hs7jqzdi784r0qjlz5-binutils-wrapper-2.31.1' from 'https://cache.nixos.org'...
copying path '/nix/store/93c3l5pdxnmnrq8ryh0jaln7npp343ip-gcc-7.4.0' from 'https://cache.nixos.org'...
copying path '/nix/store/0dyywz80hkkndj6bighqq392ppszy7sf-perl5.28.1-Encode-Locale-1.05' from 'https://cache.nixos.org'...
copying path '/nix/store/3wrcg1zy6k70pvf4dma3xv5h1kgqjxb1-gcc-wrapper-7.4.0' from 'https://cache.nixos.org'...
copying path '/nix/store/sl99nsf27mgfmigcnbh1nxkyvzjvmvg1-perl5.28.1-HTML-Tagset-3.20' from 'https://cache.nixos.org'...
copying path '/nix/store/0amchd0rpnarzvgrcarpxad8kly85ic5-perl5.28.1-HTTP-Date-6.02' from 'https://cache.nixos.org'...
copying path '/nix/store/8mkrm2kxv7zz02zza3xd33ldm6b0wiy7-perl5.28.1-HTML-Parser-3.72' from 'https://cache.nixos.org'...
copying path '/nix/store/f8al0sbbbscxvq5xm6vqi2i086msbp4q-perl5.28.1-File-Listing-6.04' from 'https://cache.nixos.org'...
copying path '/nix/store/qlgnvv94qba9c7zi3bif04z730k5pwgs-perl5.28.1-IO-HTML-1.001' from 'https://cache.nixos.org'...
copying path '/nix/store/zg2w3viqsc8cxpfwjaqif8jqfn6gcjn3-perl5.28.1-LWP-MediaTypes-6.02' from 'https://cache.nixos.org'...
copying path '/nix/store/sfmn4jykwrf9fgsahrmy28ww0hgd3lv2-perl5.28.1-TermReadKey-2.37' from 'https://cache.nixos.org'...
copying path '/nix/store/cy9k6b706yixdg6jwh4az9wr846dqnjk-perl5.28.1-Test-Needs-0.002005' from 'https://cache.nixos.org'...
copying path '/nix/store/50792v9mrzxja3cc4s3i7h2bcd0brb7z-perl5.28.1-Test-RequiresInternet-0.05' from 'https://cache.nixos.org'...
copying path '/nix/store/vyx4da3sk0jnybbks1717rklvv0zd659-perl5.28.1-Try-Tiny-0.30' from 'https://cache.nixos.org'...
copying path '/nix/store/6l7v4g34mx6ycp1r3n46cgbimxf3m259-perl5.28.1-URI-1.74' from 'https://cache.nixos.org'...
copying path '/nix/store/q9bm3i7zlxjmdv469spb6cma5cfih0ls-perl5.28.1-Test-Fatal-0.014' from 'https://cache.nixos.org'...
copying path '/nix/store/xk02njxh2v1hvqpvwp3i91yrk5q06wfw-perl5.28.1-HTTP-Message-6.18' from 'https://cache.nixos.org'...
copying path '/nix/store/x90hsr3ww113rz0658w6ay3rvlgmp5y3-perl5.28.1-Net-HTTP-6.18' from 'https://cache.nixos.org'...
copying path '/nix/store/kfqsff3308ra0dbh3aig9xg9gv182spw-perl5.28.1-HTTP-Cookies-6.04' from 'https://cache.nixos.org'...
copying path '/nix/store/5d2pwfgk42p3knphm7rmcmqi79iazfyq-perl5.28.1-HTTP-Daemon-6.01' from 'https://cache.nixos.org'...
copying path '/nix/store/ynxlmwlhczm5y4i2qwxjj3xw00nfxdiy-perl5.28.1-HTTP-Negotiate-6.01' from 'https://cache.nixos.org'...
copying path '/nix/store/w56xmk58q44czl33jn9gl5f310ff1akc-perl5.28.1-WWW-RobotRules-6.02' from 'https://cache.nixos.org'...
copying path '/nix/store/088br4d3rk7lhpxnpfrifkhsk1f1ahbn-pkg-config-0.29.2' from 'https://cache.nixos.org'...
copying path '/nix/store/8k2szzqh9na9w64akfbyhxhw0nr4nw2z-perl5.28.1-libwww-perl-6.36' from 'https://cache.nixos.org'...
copying path '/nix/store/iki0dvhrw9nvj1pmka9z0z4332r76ya4-readline-6.3p08' from 'https://cache.nixos.org'...
copying path '/nix/store/8ad1hjyd8464l74q2qn64sh6dzlzgkdq-rhash-1.3.8' from 'https://cache.nixos.org'...
copying path '/nix/store/133di3cs8b8gbcg1850rdiffafwjr3lx-python-2.7.16' from 'https://cache.nixos.org'...
copying path '/nix/store/hyi769dbhf8p8sx70gnrpsamil6pb0qx-cmake-3.13.4' from 'https://cache.nixos.org'...
copying path '/nix/store/53cms7ayg0hdm46g9g89dc5xzavvb8c6-git-2.19.2' from 'https://cache.nixos.org'...
copying path '/nix/store/ryq0pzfqdpjbzx9vxqyavw76zssrac7i-rustc-1.32.0' from 'https://cache.nixos.org'...
copying path '/nix/store/fqwsi5mhrl6568c1rfx1jl8vxnvbvnvz-source' from 'https://cache.nixos.org'...
copying path '/nix/store/zc9zvgjig6mnccwbavx8kyrb5yzg7ns3-cargo-1.32.0' from 'https://cache.nixos.org'...
copying path '/nix/store/b5j3wy8j2hvlhkh7zyy0fcxha9m5xkaq-stdenv-linux' from 'https://cache.nixos.org'...
copying path '/nix/store/84q5kyffv30hbw80ywh05m4b18s0vhza-zlib-1.2.11-dev' from 'https://cache.nixos.org'...
GC Warning: Couldn't read /proc/stat
building '/nix/store/06fi3aigs1wlbbbd3b4q6hfg7nly33ka-exa-0.8.0.drv'...
unpacking sources
unpacking source archive /nix/store/fqwsi5mhrl6568c1rfx1jl8vxnvbvnvz-source
source root is source
unpacking source archive /nix/store/7a21rfc96j21bwnlfkjsz5zd8nc2xw9j-exa-0.8.0-vendor
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
building
Running cargo build --release
Compiling winapi-build v0.1.1
Compiling libc v0.2.30
Compiling num-traits v0.1.40
Compiling rustc-serialize v0.3.24
Compiling pkg-config v0.3.9
Compiling gcc v0.3.53
Compiling winapi v0.2.8
Compiling matches v0.1.6
Compiling unicode-normalization v0.1.5
Compiling nom v1.2.4
Compiling unicode-width v0.1.4
Compiling percent-encoding v1.0.0
Compiling utf8-ranges v0.1.3
Compiling regex-syntax v0.3.9
Compiling byteorder v0.4.2
Compiling log v0.3.8
Compiling bitflags v0.9.1
Compiling getopts v0.2.14
Compiling ansi_term v0.8.0
Compiling lazy_static v0.2.8
Compiling glob v0.2.11
Compiling natord v1.0.9
Compiling scoped_threadpool v0.1.7
Compiling unicode-bidi v0.3.4
Compiling kernel32-sys v0.2.2
Compiling rand v0.3.16
Compiling memchr v0.1.11
Compiling locale v0.2.2
Compiling users v0.5.3
Compiling term_size v0.3.0
Compiling num_cpus v1.6.2
Compiling pad v0.1.4
Compiling term_grid v0.1.6
Compiling num-integer v0.1.35
Compiling number_prefix v0.2.7
Compiling iso8601 v0.1.1
Compiling cmake v0.1.25
Compiling libz-sys v1.0.16
Compiling aho-corasick v0.5.3
Compiling idna v0.1.4
Compiling num-complex v0.1.40
Compiling num-bigint v0.1.40
Compiling num-iter v0.1.34
Compiling thread-id v2.0.0
Compiling thread_local v0.2.7
Compiling regex v0.1.80
Compiling libgit2-sys v0.6.14
Compiling url v1.5.1
Compiling num-rational v0.1.39
Compiling num v0.1.40
Compiling datetime v0.4.5
Compiling zoneinfo_compiled v0.4.5
Compiling env_logger v0.3.5
Compiling git2 v0.6.8
Compiling exa v0.8.0 (/tmp/nix-build-exa-0.8.0.drv-0/source)
warning: use of deprecated item 'std::ascii::AsciiExt': use inherent methods instead
--> src/fs/file.rs:98:13
|
98 | use std::ascii::AsciiExt;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(deprecated)] on by default
warning: unused import: `std::ascii::AsciiExt`
--> src/fs/file.rs:98:13
|
98 | use std::ascii::AsciiExt;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
Finished release [optimized] target(s) in 3m 50s
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/k7j593q28g0w01xa0g5jnxm2fmm9877x-exa-0.8.0
gzipping man pages under /nix/store/k7j593q28g0w01xa0g5jnxm2fmm9877x-exa-0.8.0/share/man/
strip is /nix/store/5qj51mzplnxdfra88fxj7q0k5ki4r68a-binutils-2.31.1/bin/strip
patching script interpreter paths in /nix/store/k7j593q28g0w01xa0g5jnxm2fmm9877x-exa-0.8.0
checking for references to /data/data/com.termux.nix/files/usr/tmp/nix-build-exa-0.8.0.drv-0/ in /nix/store/k7j593q28g0w01xa0g5jnxm2fmm9877x-exa-0.8.0...
error (ignored): getting status of '/data/data/com.termux.nix/files/usr/tmp/nix-build-exa-0.8.0.drv-0/source/target/release/deps/exa-f09ef4abfab971d3': Operation not permitted
error: getting status of '/data/data/com.termux.nix/files/usr/tmp/nix-build-exa-0.8.0.drv-0/source/target/release/deps/exa-f09ef4abfab971d3': Operation not permitted
There are 76 unread and relevant news items.
Read them by running the command 'home-manager news'.
second home-manager run:
GC Warning: Couldn't read /proc/stat
GC Warning: Couldn't read /proc/stat
these derivations will be built:
/nix/store/pqchpgln0fakk3qpqavim71la1617qzc-home-manager-path.drv
/nix/store/hz5c6218yf1k6px4zb3xa6g02j10gd4m-activation-script.drv
/nix/store/2175bk5bi1bv4lpldc4h9d5a2bkny7sy-home-manager-generation.drv
building '/nix/store/pqchpgln0fakk3qpqavim71la1617qzc-home-manager-path.drv'...
created 340 symlinks in user environment
building '/nix/store/hz5c6218yf1k6px4zb3xa6g02j10gd4m-activation-script.drv'...
building '/nix/store/2175bk5bi1bv4lpldc4h9d5a2bkny7sy-home-manager-generation.drv'...
/nix/store/4swy9x7p4fwagfv4hw4xfx6f7pi87sf8-home-manager-generation
Starting home manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
GC Warning: Couldn't read /proc/stat
replacing old 'home-manager-path'
installing 'home-manager-path'
building '/nix/store/04s3847cxrwm4i1yy2j973r0nl3121l5-user-environment.drv'...
created 6 symlinks in user environment
Activating linkGeneration
Cleaning up orphan links from /data/data/com.termux.nix/files/home
Creating profile generation 3
Creating home file links in /data/data/com.termux.nix/files/home
Activating onFilesChange
Activating reloadSystemD
User systemd daemon not running. Skipping reload.
Activating xdgCreateCache
There are 76 unread and relevant news items.
Read them by running the command 'home-manager news'.
Provide an overlay to fix/patch some packages like https://github.com/termux/termux-packages does with htop for example: https://github.com/termux/termux-packages/tree/master/packages/htop.
These patched packages should be available through the nix-on-droid binary cache.
I've just noticed that nix-on-droid-session-init.sh
seems to source $HOME/.nix-profile/etc/profile.d/nix.sh
before setting $HOME
.
@Gerschtli, you might be interested.
$ nix run nixpkgs.nix-info -c nix-info -m
- system: `"aarch64-linux"`
- host os: `Linux 4.4.111-17594784`
- multi-user?: `no`
- sandbox: `no`
- version: `nix-env (Nix) 2.3.3`
- channels(nix-on-droid): `"home-manager-19.09, nix-on-droid, nixpkgs-19.09.2213.71c6a1c4a83"`
- nixpkgs: `/data/data/com.termux.nix/files/home/.nix-defexpr/channels/nixpkgs`
Hello,
nix-on-droid is just great and my favorite android app so far.
What I'm still trying to do is getting access to a folder outside for easily sharing configs and stuff:
But neither of the commands seems to be available.
I also gave the app storage permission.
Let's branch off the discussion here.
Las year, in a different repo altogether, I've started to bring Nix to Android. Back in the days, it was a Nix installation script heavily inspired by the official one, which I presumed to be authored by @edolstra and published under LGPL 2.1. Or at least I hope so, because it doesn't really come with a license header.
I thought that one day it could ship as part of a Nix, as a script to install it under Termux, so I kept the license.
Then I rewrote everything, going self-contained and Termux-free, installing through zipballs instead, but kept the license. Then you rewrote it, and kept the license.
If I were asked to trace it back to the original Nix script, I'd say that only these these two lines are what's lifted from the original install script and made it through the rewrites:
USER=${config.user.userName} ${prootCommand} "$PKG_NIX/bin/nix-store" --init
USER=${config.user.userName} ${prootCommand} "$PKG_NIX/bin/nix-store" --load-db < .reginfo
What we're heading towards today, for better or worse, is home-manager, nixos or nix-darwin territory. I would argue that this is small enough to be uncopyrightable, and those three projects already bear more similarity to nix-on-droid.
That said, how do you feel about relicensing the whole contents of this repo to MIT?
Update: termux not needed with #75 (comment)
I've been fiddling with #34 , and made something akin to progress, but there are some issues;
cc @ShamrockLee
As a temporary workaround for #34, I tried installed and running X11 in termux.
I successfully installed and ran Xvfb, and connected nix-built applications to the remote display via the $DISPLAY
variable over the loopback device. So a hybrid termux/nix-on-droid approach seems to work*.
A thrown together tutorial (no authentication, etc, the point was just to see if I can even get this to work):
VNC Viewer
(by RealVNC) from the play store, or MultiVNC from F-Droid. Sadly the UI design of the former seems to work somewhat better. For example: the MultiVNC keyboard overlaps with the screen area for me, which is irritating bk138/multivnc#76 (comment)tigervnc
, providing the vncserver
and x0vncserver
commands, which spawn an Xvnc process, and the X11 stuff which provides Xvnc, Xvfb, etc.Xvfb -listen tcp -ac &
DISPLAY=:0 x0vncserver -rfbauth /data/data/com.termux/files/home/.vnc/passwd
DISPLAY=127.0.0.1:0 x11vnc -passwd whatever -rfbport 5901 -noshm -forever
see #75 (comment)export DISPLAY=127.0.0.1:0 && awesome & xclock &
TODO: script that sshes to the termux and handles everythig in one place
I'm probably in need for slightly more explicit usage instructions, but currently, opening Nix yields me the error dialog Nix was unable to install the bootstrap package
.
Steps:
Hello,
first of all I have to thank you for this great project!
I am using nix-on-droid a while now and ran nix-collect-garbage
.. This resulted in dead links for /bin/sh
and /usr/bin/env
. Also the hardcoded paths in /bin/.login-inner
were not present anymore.
I fixed it manually, but I think it would be much better, if these binaries are linked to ~/.nix-profile/bin
on nix-on-droid-install
. I would love to provide a PR for this, but unfortunately the instructions are not complete on how to convert the zip file to an installable apk.
Additionally I have two other questions (if these should be separate issues, I will move them out of here):
/proc/stat
readable? Would be useful for fixing the warnings when running nix-channel --update
or to allow htop
to work.tmux
or similar, /bin/sh
gets executed instead of my zsh shell.can I get commands detail as well as wiki to use this application
thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.