5

(This is not a "which distribution is better" question!)

GNU GUIX and NixOS are two Linux distributions based on the NixOS package manager.

I realize that GUIX seems to use Guile for defining packages/dependencies or other meta-data uses; and I'm guess everything in GUIX is GPL'ed, while perhaps not everything in NixOS is... but those seem more like superficial differences.

What I'm hoping to understand is whether these two distributions have architectural differences of any significance.

einpoklum
  • 8,772
  • 19
  • 65
  • 129
  • The software is more or less the same across distributions. Not really sure what you mean by *architectural* but I'd suggest you compare their package management systems, that's arguably the most visible area where they can, as a distribution, be architecturally different. – Eduardo Trápani Aug 20 '23 at 14:31
  • 3
    Related: [What are the main differences between GuixSD and NixOS?](https://unix.stackexchange.com/questions/612398/what-are-the-main-differences-between-guixsd-and-nixos) – Loïc Reynier Aug 20 '23 at 14:40
  • 1
    @EduardoTrápani: I don't mean the software packages which one uses on Guix vs NixOS, I mean the distribution itself, i.e. what's _outside_ the packages themselves. – einpoklum Aug 20 '23 at 16:14

1 Answers1

4

Basically, there aren't any architectural differences between the two distributions, except for the way they handle the init system: Guix System uses GNU Sheperd while NixOS uses System D.

To the best of my understanding, Guix/Guix System is a re-implementation of the framework seen in Nix/NixOS, utilizing GNU tooling. In other words, it is like NixOS but with a different user experience:

  • The entirety of its codebase is developed using Guile and Lisp, in contrast to Nix and Bash.
  • It employs GNU Shepherd in lieu of System D.
  • Guix does not package non free software while nixpkgs do.
  • Guix provides support for the GNU Herd kernel.

I tried Guix out about a year ago and found some limitations back then:

  • Impossibility to install the root filesystem on LVM.
  • Building a package requires to recompile all Guix modules.

It is noteworthy that nixpkgs is one of the largest package repositories, whereas Guix repositories are constrained by the limited number of maintainers and the "libre software only" limitation. The Nix project is also more mature, enjoying a ten-year head start and a much larger community.

Furthermore, since Nix is a package manager, it can be installed on any distribution, including Guix System. This means that you can install packages from nixpkgs using Nix on a Guix System.

As pointed out in the comments by MegaTux, Guix is also a standalone package manager (that is shipped with the Guix System distribution) and can be installed on any distribution.

  • So, is GNU shephered a replacement for systemd, or is it just an init system? Also, is possible to use nixpkgs in Guix? – einpoklum Aug 20 '23 at 16:16
  • 1
    Sheperd is meant as a replacement of System D and also manages services. In this framework, services and packages are written in the same languages (Guile). Nix is a package manager and can be installed on any system, including Guix. Hence, you can install packages from `nixpkgs` with Nix on a Guix system. – Loïc Reynier Aug 20 '23 at 16:25
  • 2
    Guix is also a package manager that can be installed in several distros, same as Nix. Nix -> NixOS, Guix -> GuiSD (if remember the name correctly). – MegaTux Aug 20 '23 at 22:50
  • GuiSD is the old name, theses days it is called Guix System. I'll add your clarification to the answer. – Loïc Reynier Aug 21 '23 at 06:41
  • "Sheperd is meant as a replacement of System D" <- I forgot to ask if it also replaces all of the services systemd has in recent years - device management, name resolution, core dumping control, etc. etc. - or are these independent? – einpoklum Aug 21 '23 at 07:40
  • Sheperd is less mature than System D and lacks these features at the moment. You would have to set them up independently. – Loïc Reynier Aug 21 '23 at 08:08