Closed kurnevsky closed 4 months ago
Have a look at https://github.com/t184256/nix-on-droid/pull/275 :)
Thanks! It's an improvement, but it still uses the default config, and I have to clone my config inside manually. Ideally I'd want to have some output of my flake that I could run that would use this flake inside fakedroid.
Also it would be good if it used my host nix daemon to build it to use my host /nix cache, but I guess this might be a non trivial change :)
Tried it with my home, but got a permission error:
β STATE_DIR=~/tmp USE_FLAKE=1 nix run --impure github:t184256/nix-on-droid/add-support-for-fakedroid-usage'#fakedroid'
mkdir: cannot create directory β/home/kurnevsky/tmp/injβ: Permission denied
Changing it to /tmp/fakedroid worked.
Thanks! It's an improvement, but it still uses the default config, and I have to clone my config inside manually. Ideally I'd want to have some output of my flake that I could run that would use this flake inside fakedroid.
We could add reading an environment variable for the flake uri and use it instead of
Also it would be good if it used my host nix daemon to build it to use my host /nix cache, but I guess this might be a non trivial change :)
That is not possible AFAIK because the build needs to run in the proot environment.
Tried it with my home, but got a permission error:
That is strange can you show me the permissons and owner of ~/tmp
, /tmp/fakedroid
and /tmp/fakedroid/*
?
That is not possible AFAIK because the build needs to run in the proot environment.
I built everything remotely for my phone using my x86-64 pc, so it doesn't seem to matter :)
In theory it should possible to have a completely built output by main nix daemon, but I have no idea how difficult it is.
That is strange can you show me the permissons and owner of ~/tmp, /tmp/fakedroid and /tmp/fakedroid/*?
That's quite strange. All of them are owned by my main user. But I can remove files in /tmp/fakedroid only with root:
kurnevsky in π pc in ~ β ls -la /tmp/fakedroid/env/1/data/data/com.termux.nix/files/usr/nix/store/n9dk853bl3ny2mqv4pjh7440jglm8wz8-source/nixos/modules/services/hardware/power-profiles-daemon.nix
-rwxrwxrwx 1 kurnevsky users 994 Jan 1 1970 /tmp/fakedroid/env/1/data/data/com.termux.nix/files/usr/nix/store/n9dk853bl3ny2mqv4pjh7440jglm8wz8-source/nixos/modules/services/hardware/power-profiles-daemon.nix
kurnevsky in π pc in ~ β lsattr /tmp/fakedroid/env/1/data/data/com.termux.nix/files/usr/nix/store/n9dk853bl3ny2mqv4pjh7440jglm8wz8-source/nixos/modules/services/hardware/power-profiles-daemon.nix
---------------------- /tmp/fakedroid/env/1/data/data/com.termux.nix/files/usr/nix/store/n9dk853bl3ny2mqv4pjh7440jglm8wz8-source/nixos/modules/services/hardware/power-profiles-daemon.nix
kurnevsky in π pc in ~ β rm -rf /tmp/fakedroid/env/1/data/data/com.termux.nix/files/usr/nix/store/n9dk853bl3ny2mqv4pjh7440jglm8wz8-source/nixos/modules/services/hardware/power-profiles-daemon.nix
rm: cannot remove '/tmp/fakedroid/env/1/data/data/com.termux.nix/files/usr/nix/store/n9dk853bl3ny2mqv4pjh7440jglm8wz8-source/nixos/modules/services/hardware/power-profiles-daemon.nix': Permission denied
In theory it should possible to have a completely built output by main nix daemon, but I have no idea how difficult it is.
This is exceeding my knowledge..
That's quite strange. All of them are owned by my main user. But I can remove files in /tmp/fakedroid only with root:
It is hard to tell what could cause this because I can not reproduce this behaviour.. If you find a way to reproduce it or if you find a difference between ~/tmp
and /tmp/fakedroid
, I can have another look. (Maybe these are on different devices which are mounted differently?).
When trying to remove the state directories, it usually fails because of missing writable bits for the nix store paths. chmod -R +w *
and then rm
as my user works for me without any problems.
When trying to remove the state directories, it usually fails because of missing writable bits for the nix store paths. chmod -R +w * and then rm as my user works for me without any problems.
It's not the case, I did chmod 777 to this file. It worked from my user, but I still can't delete this file...
Oops, I indeed had wrong permissions for ~/tmp
. Though it doesn't explain why I can't remove created files :)
we don't have fakedroid anymore
Currently fakedroid is supposed to be run from the clone of
nix-on-droid
repository.I tried to add fakedroid to outputs of my flake with my system configs but it obviously didn't work - fakedroid expects to have some scripts in the repo.
Th reason I want it is to experiment quickly with configs without uploading and rebuilding them to my phone - it would be handy to have a single command that will create a VM (or sandbox) with my custom configs, not default ones.
Nixos-mobile has this with their
config.mobile.outputs.uefi.vm
package.