Long time Ubuntu and Manjaro user here.
I’m scoping out NixOS from a distance, reading the official docs as well as community documentation. I’m also playing with the NixOS demo appliance.
I understand the default NixOS package manager is used for system-wide installations whereas Home Manager combined with Flakes is for installing packages for specific users.
One scenario clear in my mind where using Home Manager and Flakes is advantageous over system-wide is for reproducing custom packages in a development build environment.
In my experience developing Django projects with Python, I establish my virtual environment with required packages using pip and when I deploy to my Heroku slug in prod, the packages are exactly the same as my local testing venv. My Python virtual environment packages are also sheltered and distinct from whatever system-wide packages may be installed with AUR in my local Manjaro environment. There are other tools that other developers can use to keep their development environments reproducible such as with their packages listed in Cargo.lock, go.sum, or with JSON/TOML variations depending on the language and platform. NixOS’s Flakes and Home Managers serve this same purpose for developers. I think I understand that much so far.
Since I am not a Gnome developer, testing recent changes being made with other contributors in the latest experimental branch(es) upstream in the Gnome GitLab repo is unnecessary for my use case. Therefore, I would think that using Home Manager / Flakes to handle my Gnome packages is unnecessary. Using the regular package manager and leveraging the official NixOS wiki entry for Gnome at GNOME - NixOS Wiki would be better in this situation. Is that correct?
Right now my development projects and research involves:
-
Python for data analysis in Jupyter Notebooks using pandas, matplotlib, and seaborn. Currently I use Anaconda which handles the required packages which are separate from whatever similar Python packages are installed natively on my Manjaro distro.
-
Learning algorithmic software design primarily also in Python which I am able to accomplish without even a virtual environment. All I need is my Python interpreter (>= v3.10) where I edit my source code in VS Code.
-
Writing more Django web apps, although instead of Home Manager I could continue with my previous development environment technique using Python virtual environments and pip.
This means I don’t really need a reproducible Home Manager / Flakes development environment for my use case for now I guess.
Are there other use cases for NixOS users/admins to leverage Home Manager / Flakes even for non-development purposes? What other scenarios could it be helpful to install packages on a per-user basis?