NixOS/nixos — pull request #53 by jcumming (2012-12-06 06:42:58+00:00)
Title: a zfs module

Here's a first pass at a zfs filesystem task.

It adds the necessary kernel modules and binaries to the system, It adds the udev rules for naming zvols according to the zfs name (instead of a random name). This is sufficient for using zfs for home directories, or mass storage, zvols for VMs.

I haven't tested the initrd stuff. Since the zfs userland and kernel modules do some very unsavory stuff (like calling gawk from a kernel module), it might be necessary to pull in more libraries and binaries into the initrd image. Maybe I should just pull it out the initrd stuff, but I'd like to get to the point where I can use the installer to install nix on a zfs root.

nits:
- zfs doesn't really do very well with less than 2GiB of memory
- zfs doesn't really do very well on 32 bit systems
- the 'environment.spl.hostid' option probably should be hung off a different branch of the options tree
- the initrd stuff is untested