Skip to content

Instantly share code, notes, and snippets.

@flokli
Created June 9, 2018 21:37
Show Gist options
  • Save flokli/f5c4c91c938c98f5d5cf4f815d7cd8a0 to your computer and use it in GitHub Desktop.
Save flokli/f5c4c91c938c98f5d5cf4f815d7cd8a0 to your computer and use it in GitHub Desktop.
vagrant nix
Vagrant.configure("2") do |config|
config.vm.box = "AndrewDryga/vagrant-box-osx"
config.ssh.forward_agent = true
config.vm.provision "shell", privileged: false, inline: <<-SHELL
if [ ! -d /nix ]; then
curl https://nixos.org/nix/install | sh
fi
if [ ! -d $HOME/nixpkgs ]; then
git clone https://github.com/NixOS/nixpkgs.git ~/nixpkgs
fi
mkdir -p ~/.config/nixpkgs
echo "{ allowUnfree = true; }" > ~/.config/nixpkgs/config.nix
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment