4 ms·
Nix is a package manager. It can be installed on many GNU/Linux systems or even on non-Linuxes, such as macOS. However personally I found it limited to buildin
by drdaeman 9y ago
Nix is a package manager. It can be installed on many GNU/Linux systems or even on non-Linuxes, such as macOS.
However personally I found it limited to building software (nix-shell for reproducible environments and building images), and weird to use for desktop stuff. It was just weird to have two package managers competing. Maybe someone has some neat ideas how to make it work, but I just went to NixOS.
NixOS is a GNU/Linux distro that uses Nix, and leverages it to build the whole system configuration. There, you have generations, right in the bootloader, and can boot to any of those. Which is extremely nice, as I had just stopped to worry before upgrades. If they fail (unless they break the bootloader, which is quite unlikely), I can just roll back to where I was.
Installation is performed from a shell session and requires some knowledge about how GNU/Linux works. Just like an, e.g., Gentoo or Arch Linux. Essentials are all covered in the manual: https://nixos.org/nixos/manual/index.html#sec-installation https://nixos.org/nixos/manual/index.html#sec-installation and examples of the rest (desktop environments, etc) can be found online.
Nix/NixOS may be not best in terms of UI/UX/user-friendliness (some stuff would look weird, until you get used to it - guess it's the same with any unfamiliar tech), but I have an impression that community there is very nice and very helpful (and maintains a lot of useful documentation).
I haven't used Guix or GuixSD, so can't comment about it.
tl;dr: I went with installing NixOS on a separate partition, and mounting my old /home there. No regrets and not looking back. (Whenever I need Debian or Ubuntu compatibility - e.g. build a .deb package, I just do things in a debootstrapped chroot or in Docker)
- StavrosK 9y agoHuh, that's interesting, thanks. Especially the part about booting into different configurations, that sounds like it would make the dreaded OS upgrades a breeze. I'm going to have to try it out, thank you.
- drdaeman 9y agoThat was exactly why I've converted. Got fed up with yet another system upgrade breaking sound subsystem, and installed NixOS. Now, whenever there are any regressions, I just roll back, look for a report (usually, there is one already, so I don't have to file anything) and wait for a fix. One suggestion: if you have a separate /boot - make sure it's large enough to hold a dozen of kernels+initamfses. Like, at least 256MiB. I had a 128MiB partition and given that every kernel or initramfs change leaves a new copy there, it made things a little inconvenient. It didn't break anything, just that `nixos-rebuild switch --upgrade` failed every now and then, requiring to clean up old generations even though / still had plenty of disk space.
- StavrosK 9y agoAh, thanks for the tip. That's a problem with Ubuntu as well, as old kernels don't get autoremoved often, so it's nothing worse than what I'm dealing with currently.
- rekado 9y ago> One suggestion: if you have a separate /boot - make sure it's large enough to hold a dozen of kernels+initamfses. This is different in GuixSD. The complete operating system is just another store item. `/boot` hardly grows because all that happens is that a new GRUB menu is installed. The system is "checked out" from /gnu/store by the init and then booted. The whole operating system configuration is just a single Scheme file. The configuration is unique, I think, in that GuixSD has a "system services" composition framework that allows for building up a complex graph of "system services". A system service is not to be misunderstood as just a daemon process. It's much more flexible than that. Here's a very good introduction to the service composition framework: http://www.gnu.org/software/guix/news/service-composition-in-guixsd.html