Generate a nixos config from functionalities

There's some substantial code duplication with nixos-wrappers, but that
whole directory is destined for /dev/null in the near future.