nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.33k stars 74 forks source link

Can't install home manager flake #413

Closed mags-issues closed 1 month ago

mags-issues commented 1 month ago

On a fresh install, opting for using flakes, I can't seem to install home manager. I am completely new to Nix, so hope this is the right place to file this, but.. you said to open an issue if nothing works and so far.. well 😅

-bash-5.2$ nix run home-manager/master -- init --switch
/nix/store/pdq0jql66plyfsf49ywswsi1nphb0wap-home-manager/bin/home-manager: line 50: grep: command not found
/nix/store/pdq0jql66plyfsf49ywswsi1nphb0wap-home-manager/bin/home-manager: line 51: grep: command not found
/nix/store/pdq0jql66plyfsf49ywswsi1nphb0wap-home-manager/bin/home-manager: line 52: grep: command not found
The file /data/data/com.termux.nix/files/home/.config/home-manager/home.nix already exists, leaving it unchanged...

Creating initial Home Manager generation...

warning: Nix search path entry '/data/data/com.termux.nix/files/home/.nix-defexpr/channels/nixpkgs/' does not exist, ignoring
error:
       … while evaluating the attribute 'activationPackage'

         at /nix/store/b1nkglcwrb78aml0fz88akkf5rrsmn7w-5gib3w1qa1qdprbbw3y3implzdf3wrin-source/modules/default.nix:49:7:

           48|
           49|       activationPackage = module.config.home.activationPackage;
             |       ^
           50|

       … <borked>

         at «none»:0: (source not available)

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
Uh oh, the installation failed! Please create an issue at

    https://github.com/nix-community/home-manager/issues

if the error seems to be the fault of Home Manager.
-bash-5.2$
t184256 commented 1 month ago

If your goal is to have flakes and use home-manager as a flake, then there's a template for that: https://github.com/nix-community/nix-on-droid/tree/master/templates/home-manager

mags-issues commented 1 month ago

Thanks 🙏