Merged nix branch.