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 226493
To read all comments associated with this story, please click here.
I'm mitigated
by zimbatm on Mon 2nd Apr 2007 10:43 UTC
Member since:

I've installed the OS yesterday and tried it for two hours or so, so I don't say that my opinion has most insight. Apart from the fact that the OS still needs some maturity, there is what I've found out.

To manage your OS configuration, you have to edit a central configuration file in /etc/nixos/configuration.nix. It's yet another configuration format with hashed and tables. Once the changes are done, you use `nixos-rebuild` to apply the changes. You can choose to apply the changes directly, after reboot or only provide a boot option. The new configuration will be added into the grub menu, so that you can choose on what configuration you want to boot. In other linux OSes, you only get extra entries after kernel upgrades. This is an interesting option.

While trying to install the OS, I had to edit that central configuration file multiple times to get the syntax right. Apparently the parser is not very robust because some lines require a ; at the end, but not all. I won't go into the detail, since it's an implementation matter, but the backtrace was pretty useful.

You also use that file to enable various services. For example, you can enable apache by adding "httpd = { enable = yes; }". You also have keys to choose the process's user, hostname, etc.. But, for example, vhosts are not supported. The problem I see here, is that every software that runs as a service must be supported by the configuration framework. I don't know how much work it is, but it seems a lot to me. Imagine all the configuration generators that you need for a complete system ! Just to fully support apache it already seems complicated.

On the user side, you have all the nix-* commands. They are used to build per-user packages. For example, if you need subversions, you'll use `nix-env -i subversion`. The package gets downloaded and compiled (if necessary?). All those packages are located in a complicated path that I don't remember. Binaries and such are then symlinked into your "user-configuration" package that is also in a complicated path. In the end, you'll have lots of long paths in your env and lots of symlinks.

Once the package are adapted to the system, package dependencies seems to work pretty well, as you can have multiple versions of the same package installed without affecting the system. In the fact, that problem becomes trivial and you don't have to rely on SLOTS or other "hacks" like in other distros.

The downside, from what I have seen, is that you need more work than for example in Gentoo or Arch to package your software. You only have "sh" in the /bin folder, so you have to make sure to not use absolute paths. After having installed firefox, I had to edit it's launch script to remove absolute references to /bin/env and /bin/ls for example. I don't know if it's a goot thing(TM) but it surely needs more work to get packages working correctly.

So the system looks really interesting and I'll surely come back once they support the madwifi drivers. I'm not sure that this approach is the best but at least it's really original.


Reply Score: 4