nix-on-droid
nix-on-droid copied to clipboard
Cannot update flake inputs
Whenever I try to do nix flake update or nix-on-droid switch I get this weird error. I have my NixOS and nix-on-droid configs in the same repo and it stopped working at this commit
$ nix-on-droid switch --flake ~/.nix
Building activation package...
error:
… while fetching the input 'git+file:///data/data/com.termux.nix/files/home/.nix'
error: cannot link '/nix/store/.links/1isr4xv4akzdabjak4z4wlfcnzbn8kk924chbb3vdm6fy20yyvf2' to '/nix/store/1z7g3yq059v70sbrf2plmc7h96cfzdbb-source/.gitignore': Operation not permitted
https://git.nelim.org/matt1432/nixos-configs/src/commit/ff1002c97055d19fc13902145a854c77332d625d/common/nix-on-droid.nix#L20
Nix store optimise is sometimes causing problems because of the created hardlinks. You probably need to reset nix-on-droid completely to fix this..
@Gerschtli Thank you! That was indeed my issue. Is this mentionned anywhere?
I haven't seen that problem anywhere so it would be nice to have it documented before closing this issue.
Temporarily fixed this without resetting by passing --option auto-optimise-store false when building and manually modifying the activate script (specifically the nix-env command during the installPackages phase) to also turn off auto-optimise-store.