GNU Guix

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
GNU Guix
Guix logo.svg
Stable release
1.0.1[1] / May 19, 2019; 9 months ago (2019-05-19)
Repository Edit this at Wikidata
Written inGuile Scheme, C++ (Nix core)

GNU Guix (/ɡks/[2]) is a cross-platform package manager and a tool to instantiate and manage Unix-like operating systems, based on the Nix package manager with Guile Scheme APIs and specializes in providing exclusively free software.[3] Differing from traditional package managers, Guix (like Nix) utilizes a purely functional deployment model where software is installed into unique directories generated through cryptographic hashes. Dependencies from each software are included within each hash, solving the problem of dependency hell.[4] This approach to package management promises to generate more reliable, reproducible, and portable packages.[5][6]

Guix packages are defined through functional Guile Scheme APIs specifically designed for package management. Dependencies are tracked directly in this language through special values called "derivations" which are evaluated by the Guix daemon lazily. Guix keeps track of these references automatically so that installed packages can be garbage collected when no other package depends on them. At the cost of greater storage requirements, all upgrades in Guix are guaranteed to be both atomic and efficiently rolled back. This also enables multiple users to safely install software on the same system without administrator privileges. The extra storage requirements translates to greater bandwidth usage when binary substitutes are downloaded compared to distributions such as Debian. If the user chooses to build everything from source even larger storage space and bandwidth is required.

The development of GNU Guix is intertwined with Guix System (until Guix 1.0: Guix System Distribution [GuixSD])[7], a complete installable GNU system using the Linux-libre kernel and GNU Shepherd init system.[8][9]

The roll-back feature of Guix is inherited from the design of Nix and is not found in any of the popular Linux distributions such as Debian and its derivatives, Arch Linux and its derivatives, or in other major distributions such as Fedora, CentOS or OpenSUSE.

The project is coordinated over the Internet by a team of volunteers and is incorporated in the French non-profit Guix Europe with members of the community.[10]


These features are related to the package management features of Guix. See below for the features of Guix System.

The store[edit]

Inherited from the design of Nix, most of the content of the package manager is kept in a directory /gnu/store where only the Guix daemon has write-access. This is achieved via specialised bind mounts, where the Store as a file system is mounted read only, prohibiting interference even from the root user, while the Guix daemon remounts the Store as read/writable in its own private namespace. Guix talks with this daemon to build things or fetch substitutes which are all kept in the store.

Garbage collection[edit]

Guix - like Nix - has built-in garbage collection facilities to help prune dead store items and keep the live ones[11].

Package definitions[edit]

This is an example of a package definition for the hello-package:

(define-public hello
   (name "hello")
   (version "2.10")
   (source (origin
            (method url-fetch)
            (uri (string-append "mirror://gnu/hello/hello-" version
   (build-system gnu-build-system)
   (synopsis "Hello, GNU world: An example GNU package")
    "GNU Hello prints the message \"Hello, world!\" and then exits.  It
 serves as an example of standard GNU coding practices.  As such, it supports
 command-line arguments, multiple languages, and so on.")
   (home-page "")
   (license gpl3+)))

It is written using Guile. The package recipes can easily be inspected (running e.g. guix edit hello) and changed in Guix, making the system transparent and very easily hackable.

Transactional upgrades[edit]

Inherited from the design of Nix, all manipulation of store items is independent of each other, and the directories of the store begin with a base32-encoded hash of the source code of the derivation along with its inputs.


Guix package uses profiles generations, which are a collection of symlinks to specific store items together comprising what the user has installed into the profile. Every time a package is installed or removed, a new generation will be built.

E.g. the profile of a user who only installed GNU Hello contains links to the store item which holds the version of hello installed with the currently used guix.

E.g. on version c087a90e06d7b9451f802323e24deb1862a21e0f of guix, this corresponds to the following item: /gnu/store/md2plii4g5sk66wg9cgwc964l3xwhrm9-hello-2.10 (built from the recipe above).

In addition to symlinks, each profile guix builds also contains a union of all the info-manuals, man-pages, icons, fonts, etc. so that the user can browse documentation and have access to all the icons and fonts installed.

The default symlinks to profile generations are stored under /var/guix in the filesystem.

Multiple user profiles[edit]

The user can create any number of profiles by invoking guix package -p PROFILE-NAME COMMAND. A new directory with the profile-name as well as profile-generation-symlinks will then be created in the current directory.


Guix package enables instantaneous roll-back to a previous profile generation via changing the symlink to an earlier profile generation[12]. Profiles are also stored in the store e.g. this item is a profile containing hello above: /gnu/store/b4wipjlsapvnijmbawl7sh76087vpl4n-profile (built and activated when running guix install hello).


Guix environment enables the user to easily enter an environment where all the necessary packages for development of software are present without clogging up the users default profile with dependencies for multiple projects[13].

E.g. running guix environment hello enters a throw-away environment where everything needed to compile hello on guix is present (gcc, guile, etc.).

Persistent development environment[edit]

If you want a persistent gc-rooted environment that is not garbage collected on the next run of guix gc you can create a root:

E.g. running guix environment --root=hello-root hello enters an environment where everything needed to compile guix is present (gcc, guile, etc.) and registered as a root in the current directory (by symlinking to the items in the store).


Guix pack enables the user to bundle together store items and output them as a docker binary image, a relocatable tarball or a squashfs binary[14].


Guix pack enables the user to view different graphs of the packages and their dependencies[15].

Guix System distribution[edit]

Guix System
Guix logo.svg
Guix System running Xfce, GNU IceCat and GNU Emacs
DeveloperGNU Project[16][17]
OS familyUnix-like
Working stateCurrent[18]
Source modelFree software, FSDG
Latest release1.0.1[19] / 19 May 2019; 9 months ago (2019-05-19)
Repository Edit this at Wikidata
Marketing targetDesktop
Package managerGNU Guix
Platformsx86_64, i686, arm[20]
Kernel typeMonolithic: Linux-libre (operational) Microkernel: GNU Hurd (under development)

Guix System (previously GuixSD[21]) is a Linux distribution built around the GNU Guix package manager.[22][23] It enables a declarative operating system configuration[24] and allows reliable system upgrades that can easily be rolled back[25]. It uses the Linux-libre kernel, with support for the GNU Hurd kernel under development.[26] On February 3, 2015, the distribution was added to the Free Software Foundation's list of free Linux distributions.[27]

Architecture support[edit]

The following CPU architectures are supported: IA-32, x64, AArch32, AArch64[28] and in April 2019 work was in progress for POWER9 support.[29]


System services[edit]

System services are a core feature in Guix System that enables the user to declaratively compose the configuration of daemons and background services and easily specify the relevant configurations.

This enables the user to within in a single configuration file declare the whole OS e.g. to have a tor proxy, a sshd server and a webserver serving guix-web via nginx on a specific port at bootup.

System services can[30]

  • generate files in the filesystem (needed by some applications e.g. files in /etc)
  • run any code for setting up daemons
  • create specific user and group accounts (e.g. a database user for postgresql)

Ricardo Wurmus, one of the maintainers, explains the extendability like this:

Services can extend one another, which allows us to define ways to set up complex applications, for example, that require a web server, user accounts, application-specific daemons, a database, udev rules, etc — all with just one service type.

— [31]

All the services are defined using Guile Scheme[32]. The list of services continue to grow and as of 1.0.0 the list of services includes the following[33]:

  • Base Services: Essential system services.
  • Scheduled Job Execution: The mcron service.
  • Log Rotation: The rottlog service.
  • Networking Services: Network setup, SSH daemon, etc.
  • X Window: Graphical display.
  • Printing Services: Local and remote printer support.
  • Desktop Services: D-Bus and desktop services.
  • Sound Services: ALSA and Pulseaudio services.
  • Database Services: SQL databases, key-value stores, etc.
  • Mail Services: IMAP, POP3, SMTP, and all that.
  • Messaging Services: Messaging services.
  • Telephony Services: Telephony services.
  • Monitoring Services: Monitoring services.
  • Kerberos Services: Kerberos services.
  • LDAP Services: LDAP services.
  • Web Services: Web servers.
  • Certificate Services: TLS certificates via Let’s Encrypt.
  • DNS Services: DNS daemons.
  • VPN Services: VPN daemons.
  • Network File System: NFS related services.
  • Continuous Integration: The Cuirass service.
  • Power Management Services: Extending battery life.
  • Audio Services: The MPD.
  • Virtualization Services: Virtualization services.
  • Version Control Services: Providing remote access to Git repositories.
  • Game Services: Game servers.
  • Miscellaneous Services: Other services.

GNU Shepherd Init system[edit]

Guix System uses the GNU Daemon Shepherd as its init system, which is developed in tandem with Guix and is written in Guile as well. It was previously known as "dmd", which stood for "Daemon managing Daemons" or "Daemons-managing Daemon", but changed names to avoid collision with the Digital Mars D compiler.[34]

Shepherd supplies user-space functionality asynchronously as services, which under Shepherd are generic functions and object data types that are exported for use by the Shepherd to extend the base operating system in some defined way. In contrast to systemd, a userspace shepherd process runs as that user. Core to the Shepherd model of user space initialisation is the concept of the extension, a form of composability where services are designed to be layered onto other services, augmenting them with more elaborate or specialised behaviours as desired.[35] This expresses the instantiation-based dependency relationships found in many modern init systems,[36] making the system modular, but also allows services to interact variadically with other services in arbitrary ways.

Shepherd also provides so-called virtual services which allow dynamic dispatch over a class of related service objects, such as all those which instantiate a mail transfer agent (MTA) for the system.[37] A system governed via the Shepherd daemon can represent its user space as a directed acyclic graph, with the "system-service" − responsible for early phases of boot and init − as its root, and all subsequently initialised services as extensions to system-service's functionality, either directly or transitively over other services.[35][38]

Being both written and configured in Guile Scheme, GNU Shepherd is intended to be highly programmable by the system administrator, but it can also be used to manage per-user profiles of unprivileged daemons and services.[39] Its services and configuration are stored uniformly as object-oriented Scheme code, and while a core set of services are provided with the basic Guix System Distribution,[40] arbitrary new services can be flexibly declared, and through Guile's object system, GOOPS, existing services can be redefined at the user's discretion by asking the Shepherd to dynamically rewrite services in specified ways on instantiation.[41][42]

GNU Shepherd was originally designed to work with GNU Hurd, and was later adopted by Guix System.[43]

Release and stability[edit]

Guix System to date has only an unstable development git repository[44] shared with Guix but enables users or organizations to set up stable release channels themselves via the channel-feature[45].


Packages in Guix are generally very up-to-date thanks to the lack of a package maintainer bottleneck: anyone can contribute an update subject to community approval and the process is assisted by tools such as guix refresh[46].

Changes to the git repository are peer-reviewed by community members and committed by one of the 45 people with commit access.[47] In practice sometimes these builds cause system breakages for users because of a typo or similar error, but these are often solved within minutes. The way Guix pull operates means users retain a working system in the meantime.


If a system update should leave users with a broken system, users can easily roll back individual packages as well as the whole system state[48]. This means that a stable channel which is very common in other Linux distributions is no longer needed for users who are willing to report a bug and wait a few minutes, when trying to update via guix pull.


The GNU Project announced in November 2012 the first release of GNU Guix, a functional package manager based on Nix that provides, among other things, Guile Scheme APIs.[49] The project was started on June 2012 by Ludovic Courtès, one of the GNU Guile hackers.[50] On August 20, 2015, it was announced that Guix had been ported to GNU Hurd.[51]


The project has no fixed release schedule and has until now released approximately every 6 months.

Version Announcement Supported architectures Packages
0.1 (alpha) Courtès, Ludovic (January 18, 2013). "GNU Guix 0.1 released (alpha)". i686, x86_64 ~150
0.2 (alpha) Courtès, Ludovic (May 12, 2013). "GNU Guix 0.2 released (alpha)". i686, x86_64 ~400
0.3 Courtès, Ludovic (July 17, 2013). "GNU Guix 0.3 released". i686, x86_64 ~430
0.4 Courtès, Ludovic (September 27, 2013). "GNU Guix 0.4 released". i686, x86_64 ~490
0.5 Courtès, Ludovic (December 11, 2013). "GNU Guix 0.5 released". i686, x86_64 ~600
0.6 Courtès, Ludovic (April 9, 2014). "GNU Guix 0.6 released". i686, x86_64 ~691
0.7 Courtès, Ludovic (July 25, 2014). "GNU Guix 0.7 released". i686, x86_64 ~825
0.8 Courtès, Ludovic (November 18, 2014). "GNU Guix 0.8 released". i686, x86_64, mips64el ~987
0.8.1 Courtès, Ludovic (January 29, 2015). "GNU Guix 0.8.1 released". i686, x86_64, mips64el, armv7 ~1151
0.8.2 Courtès, Ludovic (May 14, 2015). "GNU Guix 0.8.2 released". i686, x86_64, mips64el, armv7 ~1869
0.8.3 Courtès, Ludovic (July 22, 2015). "GNU Guix 0.8.3 released". i686, x86_64, mips64el, armv7 ~2048
0.9.0 Courtès, Ludovic (November 5, 2015). "GNU Guix 0.9.0 released". i686, x86_64, mips64el, armv7 ~2591
0.10.0 Courtès, Ludovic (March 29, 2016). "GNU Guix & GuixSD 0.10.0 released". i686, x86_64, mips64el, armv7 ~3230
0.11.0 Courtès, Ludovic (August 3, 2016). "GNU Guix & GuixSD 0.11.0 released". i686, x86_64, mips64el, armv7 ~3714
0.12.0 Wurmus, Ricardo (December 21, 2016). "GNU Guix & GuixSD 0.12.0 released". i686, x86_64, mips64el, armv7 ~4567
0.13.0 Courtès, Ludovic (May 22, 2017). "GNU Guix & GuixSD 0.13.0 released". i686, x86_64, mips64el, armv7, aarch64 ~5407
0.14.0 Courtès, Ludovic (December 7, 2017). "GNU Guix & GuixSD 0.14.0 released". i686, x86_64, mips64el, armv7, aarch64 ~6618
0.15.0 Courtès, Ludovic (July 6, 2018). "GNU Guix & GuixSD 0.15.0 released". i686, x86_64, mips64el, armv7, aarch64 ~7857
0.16.0 Courtès, Ludovic (December 6, 2018). "GNU Guix & GuixSD 0.16.0 released". i686, x86_64, mips64el, armv7, aarch64 ~8715
1.0.0 Courtès, Ludovic (May 2, 2019). "GNU Guix & GuixSD 1.0.0 released". i686, x86_64, mips64el, armv7, aarch64 ~9712
1.0.1 Courtès, Ludovic (May 19, 2019). "GNU Guix & GuixSD 1.0.1 released". i686, x86_64, mips64el, armv7, aarch64 ~9771


Guix System[edit]

Jesse Smith from DistroWatch Weekly reviewed GuixSD 0.15.0, and said, "GuixSD has a package manager that I like", but criticized the limited hardware support and its limited documentation.[52]

See also[edit]


  1. ^ Ludovic Courtès (May 19, 2019). "GNU Guix 1.0.1 released". Retrieved May 22, 2019.
  2. ^ "GNU Guix Reference Manual". Retrieved April 23, 2018.
  3. ^ Ludovic Courtès (2013). "Functional Package Management with Guix". Madrid, Spain: European Lisp Symposium.
  4. ^ Prins, P., Suresh, J. and Dolstra, E., "Nix fixes dependency hell on all Linux distributions," Archived December 26, 2008, at the Wayback Machine, December 22, 2008
  5. ^ Dolstra, E., de Jonge, M. and Visser, E. "Nix: A Safe and Policy-Free System for Software Deployment." In Damon, L. (Ed.), 18th Large Installation System Administration Conference (LISA '04), pages 79–92, Atlanta, Georgia, USA. USENIX, November 2004.
  6. ^ Dolstra, E. The Purely Functional Software Deployment Model. PhD thesis, Faculty of Science, Utrecht, The Netherlands. January 2006. ISBN 90-393-4130-3.
  7. ^ "What to call Guix?" (Mailing list). gnu-system-discuss. January 15, 2015.
  8. ^ Programming Interface (GNU Guix Reference Manual)
  9. ^ Guix: A New Package Manager & GNU Distribution - Phoronix
  10. ^ "guix-europe". Retrieved May 16, 2019.
  11. ^ "Invoking guix gc". Retrieved May 16, 2019.
  12. ^ "Invoking guix package". Retrieved May 16, 2019.
  13. ^ "Invoking guix environment". Retrieved May 16, 2019.
  14. ^ "Invoking guix pack". Retrieved May 16, 2019.
  15. ^ "Invoking guix graph". Retrieved May 16, 2019.
  16. ^ GuixSD Contributors. "About — GuixSD". Retrieved March 16, 2017.
  17. ^ "GNU/Linux FAQ - GNU Project - Free Software Foundation". Free Software Foundation. Retrieved May 14, 2017.
  18. ^ "Download — GNU Guix". Retrieved November 3, 2019.
  19. ^ Ludovic Courtès (May 19, 2019). "GNU Guix 1.0.1 released". Retrieved May 22, 2019.
  20. ^ Mathieu Othacehe. "Porting GuixSD to ARMv7". Retrieved February 17, 2018.
  21. ^ "What to call Guix?" (Mailing list). gnu-system-discuss. January 15, 2015.
  22. ^ "List of Free GNU/Linux Distributions". Retrieved February 3, 2015.
  23. ^ "Guix: A New Package Manager & GNU Distribution". Phoronix. Retrieved February 3, 2015.
  24. ^ "Using the Configuration System". Retrieved April 27, 2019.
  25. ^ "Package Management". Retrieved April 27, 2019.
  26. ^ "GNU Guix & GuixSD 0.12.0 released" (Mailing list). guix-devel. December 21, 2016.
  27. ^ "FSF adds Guix System Distribution to list of endorsed distributions". Free Software Foundation. February 3, 2015. Retrieved February 3, 2015.
  28. ^ "Download". Retrieved April 27, 2019.
  29. ^ "Patch adding POWER9 cross compile support" (Mailing list). Retrieved April 27, 2019.
  30. ^ Wurmus, Ricardo. "Re: Help with preparing to move from Arch Linux to Guix" (Mailing list). Retrieved May 11, 2019.
  31. ^ Wurmus, Ricardo. "Re: Help with preparing to move from Arch Linux to Guix" (Mailing list). Retrieved May 11, 2019.
  32. ^ "guix.git". Retrieved May 11, 2019.
  33. ^ "Services". Retrieved May 11, 2019.
  34. ^ "guix-devel mailing lists". Retrieved November 5, 2016.
  35. ^ a b "GNU Guix Reference Manual: Service Composition". GNU Project. Retrieved November 5, 2016.
  36. ^ "systemd: Unit Dependencies and Order". Fedora Magazine. Retrieved November 5, 2016.
  37. ^ "The GNU Shepherd Manual: Jump Start". GNU Project. Retrieved November 5, 2016.
  38. ^ "GNU Guix Reference Manual: Shepherd Services". GNU Project. Retrieved November 5, 2016.
  39. ^ "The GNU Shepherd Manual". GNU Project. Retrieved November 5, 2016.
  40. ^ "GNU Guix Reference Manual: Services". GNU Project. Retrieved November 5, 2016.
  41. ^ "GNU Guix Reference Manual: Service Types and Services". GNU Project. Retrieved November 5, 2016.
  42. ^ "GNU Guix Reference Manual: Using the Configuration System". GNU Project. Retrieved November 5, 2016.
  43. ^ "GNU Shepherd". GNU project. Retrieved February 12, 2016.
  44. ^ "Re: We need an RFC procedure" (Mailing list). Retrieved April 27, 2019.
  45. ^ "Channels". Retrieved April 27, 2019.
  46. ^ "Invoking guix refresh". Retrieved May 16, 2019.
  47. ^ "GNU Guix - Summary: Project Memberlist". Retrieved April 27, 2019.
  48. ^ "Invoking guix system". Retrieved April 27, 2019.
  49. ^ Courtès, Ludovic (November 23, 2012). "Introducing GNU Guix" (Mailing list). gnu-system-discuss.
  50. ^ Stallman, Richard (June 5, 2012). "A GNU Distribution" (Mailing list). gnu-system-discuss.
  51. ^ Ragkousis, Manolis (August 20, 2015). "[GSoC update] Porting Guix to GNU/Hurd" (Mailing list). guix-devel. Retrieved August 20, 2015.
  52. ^ Smith, Jesse. "Guix System Distribution 0.15.0 and ReactOS 0.4.9". (778). Retrieved August 30, 2018.

External links[edit]