Skip to content

Instantly share code, notes, and snippets.

@abcdw
Last active February 17, 2024 14:21
Show Gist options
  • Star 36 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abcdw/e54807b0a25e61fe2cf1bf8991410f83 to your computer and use it in GitHub Desktop.
Save abcdw/e54807b0a25e61fe2cf1bf8991410f83 to your computer and use it in GitHub Desktop.
nix vs guix.org

Nix vs Guix

These are notes to the stream: https://youtu.be/S9V-pcTrdL8

Some notes

  • We are not aware of a lot of GNU software available to us.
  • Seems that Guix more hacker-friendly/explorable.

General comparsion

DescriptionNixGuixComment
Established20032013
Poprietary SoftwareYesNo
Other OSeMacOS, GNU/LinuxGNU/Linux, Hurd
Packagesnixpkgs (53000)guix (15000+)https://repology.org/
Nix vs GuileNixGNU Guile
DocumentationDocbookGNU Texinfo
Branching modelCombinedRolling-release
Service managersystemdGNU Shepherd
Build scriptsBashG-exps
Version lockFlakesChannels
ConsistencyMediumHigh
cli implementationc++guile
Bootstrapping?YesGNU Mes
Module SystemYesNo
ImplicityFrequentOKeish

Version lock

Flakes seems to provide more hermetic builds than guix channels. Guix still can access different values on host, maybe I’m not yet aware of some features like pure evaluation mode or something similiar.

Nix vs Guile

Nix isn’t bad, but feels like DSL and it’s necessary to learn/invent new patterns, the tooling is kinda lacking. There are some goodies: you can have few versions of nixpkgs in one profile at the same time, nix doesn’t have namespaces and it won’t fail with name collision.

Guile is full-fledged scheme with good tooling.

Packages

Nix has much more packaged.

Guix has only free software in main repo, definitions looks more consistent and less hacky.

Documentation

Guix has centralaized and well-organized documentation in html/pdf/info format. Moreover info format has links to related topics like guile, different gnu utilities and so on.

For example info:guix#Build Systems refers to info:guile#Optional Arguments.

Branching model

NixOS has a release twice an year. Guix doesn’t have stable branch, all fixes goes straight to master. Is it bad or good is debatable, because it’s possible to freeze versions of specific packages or even whole development environments. That’s mean that we can keep as less system packages as possible to reduce attack surface and possible breakage on pulling updates from master, everything else will be managed per-user or per-project inside profiles.

Guix problems

  • You can’t use few channels with different version of guix in one profile

Nix problems

  • Inconsistent nix cli
  • Tooling kinda lacking for nix language
  • Glued together different parts not so well integrated

Resources

@rekado
Copy link

rekado commented Dec 29, 2023

Is it possible to declaratively install the nix package manager in Guix?

Yes.

Is there anything that Guix can manage declaratively that NixOS can't?

Guix has an abstraction for system services, i.e. anything that contributes to the operating system. Unlike NixOS where a system is a free for all global namespace, in Guix all system services form a DAG.

but given the package gap & state of libre firmware & driver support, it would probably make more sense to run Guix inside NixOS rather than the other way around.

You can use vanilla Linux and non-free firmware with Guix System. You just need the linux and linux-firmware packages from the nonguix channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment