Today, I wanted to have another go with nix. Previously I just read about it and didn’t do anything for a couple of months. Now, I installed nix package manager with very few lines of code and two more to install many packages as described in his post. Installation was very fast on my banana laptop. Until now I used distrobox but I always wondered which distro/ package manager to use. What’s your experience with it?
For now, I’ll test it. It’s super easy to use. It may not be straight forward to a linux newcomer but if you know what you want, e.g. ffmpeg you can just add it with home-manager edit
and install it with home-manager switch
. So far, I love it!
Dont. uBlue also switched away from it.
My question is, how do I remove it again?
What does uBlue switching away from it have to do with someone wanting to install it on Silverblue?
He thought it’s not possible to install nix on silverblue and another commenter tried to install it on secureblue. It’s not possible there. The problem is either somewhere along the supply chain (ublue) or with secure blue
Removing nix is mostly done by deleting /nix, and removing some systemd services, as well as deleting some nix-related users or groups (iirc nixblkd)
Because almost all of nix happens in /nix it doesn’t clutter much of the system.
/nix doesnt work on Fedora Atomic, thats the thing. So it has to be somewhere else.
I still have dozens of strange Nix users left
Why does it work on my machine? I’m on silverblue
Dont know how they solve it, but /nix is not possible.
Maybe in /var/nix and symlinked or mounted to /nix
Yes, that’s likely the case.
The ahayzen/silverblue-nix guide uses bind mounts from
/var/lib/nix
to/nix
. The latter being created by making/
temporarily writeable withchattr +i /
.
https://gitlab.com/ahayzen/silverblue-nix#using-nix-on-fedora-silverblue
It’s possible to install nix on Fedora Atomic by disabling SELinux and using bind mounts.
I didn’t disable selinux
It seems the Determinate Nix installer supports Fedora Atomic and SELinux.
On topic:
I really like Nix and home-manager. I’ve mostly switched to NixOS because it’s more convenient for window manager setups than building ublue images imo.
Having to mess with containers for different dev environments and keeping the up to date is imo more annoying than creating a shell.nix
Also being able manage my dorfiles with home-manager and installing software declaratively helps in keeping the system free of clutter.
disabling SELinux
I hope this is not a serious suggestion?
This needs correct SELinux labels, and not just disabling it.
Dan Walsh is very sad.
It seems the Determinate Nix installer supports Fedora Atomic with SELinux enabled.
supporting SELinux and OSTree based distributions without asking users to make compromises
https://github.com/DeterminateSystems/nix-installer
Edit:
disabling SELinux
I hope this is not a serious suggestion?
Since no nix installer supported SELinux at the time, it was the only way to use nix on Fedora Atomic. With a better option available disabling SELinux is a bad idea indeed.
Why?
Bazzite user here and I’m using flatpaks whenever possible and distrobox for everything else; which are the benefits of Nix over these?
It’s faster than distrobox, it’s not within a box but on host, it’s easier than most package managers. I still go for flatpak first but for everything else I use nix. Especially for programming environment it looks to be much better than distrobox
Nix is useful for CLI packages, which aren’t very simple to use through flatpak. It also has far more packages, and is very useful for creating development environments.
Homebrew for CLI. Distrobox needs to be used with Arch, at least the Fedora boxes are literally not possible to system upgrade.
My experience is that nix package configs are tested on NixOS. I used it on other OSes, and I easily encountered misconfigurations and such. The problem is that they are understaffed.
I ended up combining a few package managers due to this, but I’d have preferred to use another manager solely.