nix-community / nix-on-droid

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

missing documentation about basics #195

Open ShalokShalom opened 2 years ago

ShalokShalom commented 2 years ago

Hi, I installed Nix on Droid a couple of months ago and did not update or use it for that time.

Now, I see no helping information on the homepage, this GitHub page and its readme or the help entry in Nix itself.

I appreciate a 'how to update, install and remove packages' section at least in the readme.

Thanks ๐Ÿ˜Š๐Ÿ‘๐Ÿป

Gerschtli commented 2 years ago

What kind of details would you expect? We are using nix, so basically linking to nix manual for basics. We should definitely generate easy to access overview for all options like it is done for home-manager. Would that be enough? "How to update" is just plain nix knowledge. Not sure if it would be reasonable to duplicate all basics from nix manual or all the other nix starter tutorials in the web to this README.

t184256 commented 2 years ago

Contributions will be welcome, but it won't be an easy task since Nix is seriously different from other package managers in that there's conceptually no nix install / nix remove, and explaining the declarative configuration paradigm requires some effort.

ShalokShalom commented 2 years ago

We are using nix, so basically linking to nix manual for basics

Jep, sounds sane.

vinniec commented 2 years ago

sorry if I intrude here but I was checking the issues just looking for a question like this. Obviously everything you have done is more than enough but I believe the problem is inherent in the limited ability a newbye has to put together the knowledge he has to understand how to make everything work. For example, reading this discussion I realized that I can run emacs in graphical mode with nix-on-droid and xvnc, however even if the user has explained it clear I have no idea how to do the same by myself. I'd like to find a little tutorial explaining how to make a trivial program (such as circus linux forma example) work with nix-on-droid, not because your work is insufficient but because I'm inexperienced!

It is sad not to find much information dedicated to novices about nix-on-droid and nix in general on the net, they probably are subjects too complex to cover in a simplistic way.

Gerschtli commented 2 years ago

Thank you for your feedback. It is always valuable to get feedback from inexpierenced people because sometimes it all feels so clear when you are already deep into the topic. So first of all, I think there are a lot of beginner friendly resources for nix itself. Checkout https://nix.dev/ and the links in https://nix.dev/recommended-reading.

For nix-on-droid, all standard things like installation as channel or flake can be taken from nix documentation, these are no special things related to nix-on-droid. We also put examples and getting started configurations in the readme.

Then there is the nix-on-droid script itself. Running --help should provide some overview about the usages.

For managing the configuration itself with the module DSL originating from NixOS configurations, consulting the official docs in https://nixos.org/ is a good starting point. As mentioned earlier, we definitely need to improve the searchability of available options (see https://github.com/t184256/nix-on-droid/issues/36).

Also there is the wiki where some guides are documented.

nix and its ecosystem is complex, so starting your journey with nix-on-droid is a big challenge because it requires knowledge in multiple different areas.

If you have concrete ideas, what we could add/improve in our readme, wiki or in a different place, let us dicuss them :)

ShalokShalom commented 2 years ago

For nix-on-droid, all standard things like installation as channel or flake can be taken from nix documentation, these are no special things related to nix-on-droid.

Exactly that is missing from the README. Some people dont even know about Nix, when encountering this repo.

Gerschtli commented 2 years ago

Yeah sure, we can add that one.

Some people dont even know about Nix, when encountering this repo.

Do you happen to know or have any idea why this is the case and what kind of background they might have? Maybe that could help us provide better getting started information.

ShalokShalom commented 2 years ago

To me, it was simply an alternative to Termux. ๐Ÿ˜„

vinniec commented 2 years ago

I am totally inexperienced so sorry if I'm about to say stuoid things, I ask you a first question and then you can evaluate whether to include it in the readme in a section for newbye (a FAQ?).

After installing nix-for-droid and after downloads its data, it shows me the initial status in a terminal. The first thing I asked myself is this, if I start experimenting and messing around, is there a way to get back to the initial state without erasing the nix-on-droid data and having it re-download all over again?

vinniec commented 2 years ago

I remember that in termux Icould make a backup but it was quite cumbersome.
Howevee I guess nix has this intrinsically.

Gerschtli commented 2 years ago

It depends what you are doing. If you are manually creating/removing/changing files that are not managed by nix/nix-on-droid, that can not be easily reverted, but I think from the initial setup, that would be probably only ~/.nix-channels and ~/.config/nixpkgs/nix-on-droid.nix.

If you are talking about changing the config (and you are not setting build.activation.* manually) then everything should be revertable by changing the config and running nix-on-droid switch.

vinniec commented 2 years ago

yes, I mean everything that is handled by nix. From what you are saying it seems that everything about nix is โ€‹โ€‹installed in the home, is that correct? i will investigate the switch command, thanks.

Gerschtli commented 2 years ago

From what you are saying it seems that everything about nix is โ€‹โ€‹installed in the home, is that correct?

No. nix itself creates stuff in /nix and ~/.nix*. nix-on-droid manages stuff in /bin, /etc and /usr.