Skip to content

Instantly share code, notes, and snippets.

@pesterhazy
Last active August 29, 2015 14:16
Show Gist options
  • Save pesterhazy/b7087a242cde01bfda86 to your computer and use it in GitHub Desktop.
Save pesterhazy/b7087a242cde01bfda86 to your computer and use it in GitHub Desktop.
Trying out nixos 14.12 in vagrant
# The vagrant box provided by @zimbatm is still on 14.02. Follow
# this recipe to update the machine to 14.12
#
# Make sure you have a recent version of `vagrant` (https://www.vagrantup.com)
# and virtualbox.
mkdir nixos-test
cd nixos-test
vagrant init zimbatm/nixbox64 # creates Vagrantfile
vagrant up # brings up the box
# ... wait ...
vagrant ssh
# --- inside the vagrant machine
sudo nix-channel --list
sudo nix-channel --remove nixos
sudo nix-channel --add http://nixos.org/channels/nixos-14.12 nixos
sudo nixos-rebuild switch --upgrade
sudo reboot # switch to the new kernel
# you can now add packages in /etc/nixos/configuration.nix
# and run `sudo nixos-rebuild switch`
#
# You can also install packages imperatively using `sudo nix-env -i <package-name>`
#
# To find the name of a package use `sudo nix-env -Paq` like so:
#
# sudo nix-env -Paq | grep git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment