Linked by Thom Holwerda on Sun 1st Apr 2007 15:44 UTC, submitted by John Nilsson
Linux "NixOS is a Linux distribution based on Nix, a purely functional package management system. NixOS is an experiment to see if we can build an operating system in which software packages, configuration files, boot scripts and the like are all managed in a purely functional way, that is, they are all built by deterministic functions and they never change after they have been built."
Permalink for comment 226401
To read all comments associated with this story, please click here.
Just tried it
by Tom5 on Sun 1st Apr 2007 20:13 UTC
Tom5
Member since:
2005-09-17

I've just installed it and tried it out. Here's my take (comparison with Zero Install from http://0install.net):

Nix is a "purely functional" package manager. It is purely functional in the sense that each version of a package has its own directory. As with Zero Install, "upgrading" creates a new directory for the new version, rather than modifying the existing one. Unlike Zero Install, however, whether a package is installed affects the behaviour of the system. For example, running "firefox" when Firefox isn't installed produces an error in Nix, whereas in Zero Install it will install Firefox first if missing and then continue. In other words, installation has side-effects in Nix.

Additional feeds (e.g. for pre-built binaries) can be registed using "nix-channel --add", which appears to work much like "0launch --feed", although each channel can contain binaries for multiple packages.

Each version of a package has a digest, which includes all build dependencies (e.g. the version of the compiler used), just as it does in Zero Install (for packages built using 0compile, at least).

One difference between Nix and Zero Install is that Nix treats configurations as packages. Changing your configuration is like "upgrading" your configuration package to a new version. Rolling back a change is like reverting to a previous version. Zero Install doesn't generally handle configuration settings, preferring to let the user use subversion for that, but it's an interesting idea.

Building a Nix package involves creating a "Nix expression" in a (custom) functional language. The expression fills the same role as a Zero Install source feed (it says where to download the source, what its digest is, what the build dependencies are, and how to build it).

While Zero Install is mainly targeted at adding additional packages to an existing system, Nix aims to manage the whole system (although it installs cleanly alongside your existing package manager). Nix packages have short names (like "perl") not full URIs, and thus it appears to assume a centrally-controlled repository. Nix does not currently appear to sign the channel files.

Can mutually untrusting users share packages safely? The manual says "A setuid installation should only by used if the users in the Nix group are mutually trusted, since any user in that group has the ability to change anything in the Nix store", which sounds like a "No", whereas Zero Install support this: http://0install.net/sharing.html

How are channels secured? I had a look at a MANIFEST file, but didn't see any kind of signature. I was never prompted about keys, etc.

Are packages namespaced? Dependencies seem to have short names (like "perl"). Presumably there's a central authority that assigns names?

I've only had a brief look though, but it's good to see more people developing systems like this. Corrections welcome!

Edited 2007-04-01 20:17

Reply Score: 5