This is for a Windows host.
See other material by ocharles, ocharles (new), Fūzetsu, Pavel Kogan.
See mailing list post on haskell-ng. This is still unresolved for me.
Give it two network adapters. Set one to "host only" and one to the default, "NAT". Do SSH connections over the host-only connection. The reason is that connections to the NAT machine are dropped when Windows goes to sleep.
Don't follow the special instructions on the NixOS wiki; as of early 2015 they're wrong. Download an ISO, mount it in VBox, and follow the normal NixOS installation method.
$ fdisk /dev/sda # Create a full partition, For quick setup use these commands in order: n, p, 1, w
$ mkfs.ext4 -j -L nixos /dev/sda1
$ mount LABEL=nixos /mnt
$ nixos-generate-config --root /mnt
$ nano /mnt/etc/nixos/configuration.nix
Uncomment boot.loader.grub.device = "/dev/sda"; Do not add fileSystems stuff or virtualbox guest additions; that's in the hardware autodetect script.
users.mutableUsers = false;
users.extraUsers.christian = {
isNormalUser = true;
home = "/home/christian";
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-rsa ..."
];
uid = 1000;
};
security.sudo.wheelNeedsPassword = false;
$ nixos-install
$ reboot
Get the VM's IP address:
$ ip a
Use PuTTY for SSH. Set up a connection profile. Set the auto-login username in the Connection>Data menu.
For decent colors, see solarized. Edit the profile name at the end of the registry key to the nixos profile; it'll just override the colors.