Skip to content

Instantly share code, notes, and snippets.

@mseri
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mseri/4ace5c7e67c541e7483f to your computer and use it in GitHub Desktop.
Save mseri/4ace5c7e67c541e7483f to your computer and use it in GitHub Desktop.
Nix ready debian-jesse-base vagrant box
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"
config.vm.network "forwarded_port", guest: 80, host: 9090
config.vm.synced_folder "data", "/shared_data"
# Install nixos package manager - nix - (for provisioning purposes?)
config.vm.provision "shell", inline: <<-SHELL
echo "Downloading nix..."
wget -nv http://hydra.nixos.org/build/23017506/download/1/nix_1.9-1_amd64.deb
echo "Installing nix..."
# install necessary deps first, you can remove this step if you
# can live with an ignorable error message
apt-get install libdbd-sqlite3-perl libdbi-perl libwww-curl-perl
dpkg -i nix_1.9-1_amd64.deb
# this is to install the missing deps and configure the package
# if some deps changed
apt-get -fy install
echo "Install complete"
# update configuration settings for nix and create skeleton folders
nix-channel --update
# move the script above in a separate file and add the necessary
# nix commands. For more informations have a look at:
# http://nixos.org/nix/
# http://nixos.org/releases/nix/nix-1.9/manual
# https://github.com/aflatter/nixconfig
# Good but slightly outdated - http://sandervanderburg.blogspot.co.uk/2013/06/setting-up-multi-user-nix-installation.html
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment