Vagrant: Difference between revisions

From NixOS Wiki
imported>Samueldr
m Adds link to the nixos box page for the vagrant-nixos-plugin
imported>Samueldr
m Adds a (slightly wrong) documentation to make use of NFS mounts and vagrant.
Line 2: Line 2:


{{note|This page is about vagrant, see [[Vagrant Box]] for the NixOS vagrant boxes.}}
{{note|This page is about vagrant, see [[Vagrant Box]] for the NixOS vagrant boxes.}}
== NixOS as Host ==
=== Using NFS mounts ===
Add to your <tt>configuration.nix</tt>:
<syntaxhighlight lang="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;
}
</syntaxhighlight>
This will make NFS mounts work.
{{note|Do note that vagrant will, by default, want to use <code>sudo</code> and modify <tt>/etc/exports</tt>. As long as you are not defining exports with <tt>configuration.nix</tt>, vagrant should be able to work.}}


== Plugins ==
== Plugins ==

Revision as of 18:34, 23 February 2018

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.