Vagrant

From NixOS Wiki
Revision as of 18:34, 23 February 2018 by imported>Samueldr (Adds a (slightly wrong) documentation to make use of NFS mounts and vagrant.)
Note: This page is about vagrant, see Vagrant Box for the NixOS vagrant boxes.

NixOS as Host

Using NFS mounts

Add to your configuration.nix:

{
  # Minimal configuration for NFS support with Vagrant.
  services.nfs.server.enable = true;
  # !!! This is "unsafe", ports needed should be found and fixed here.
  networking.firewall.enable = false;
}

This will make NFS mounts work.

Note: Do note that vagrant will, by default, want to use sudo and modify /etc/exports. As long as you are not defining exports with configuration.nix, vagrant should be able to work.

Plugins

NixOS Plugin

See the NixOS vagrant box page, which as information about the vagrant-nixos-plugin project.