Vagrant: Difference between revisions

imported>Mic92
document vagrant quirk
imported>Lheckemann
No edit summary
Line 13: Line 13:
   # Minimal configuration for NFS support with Vagrant.
   # Minimal configuration for NFS support with Vagrant.
   services.nfs.server.enable = true;
   services.nfs.server.enable = true;
  # !!! This is "unsafe", ports needed should be found and fixed here.
   networking.firewall.extraCommands = ''
   networking.firewall.enable = false;
    ip46tables -I INPUT 1 -i vboxnet+ -p tcp -m tcp --dport 2049 -j ACCEPT
  '';
}
}
</syntaxhighlight>
</syntaxhighlight>


This will make NFS mounts work.
This should 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.}}
{{note|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.}}
 
{{note|Home directories are set not to be world-searchable by default on NixOS. This may lead to a "permission denied" error when trying to mount directories within your home into the VM. You can change this by running <code>chmod a+x ~</code>, but note that this will allow all users on the system to read world-readable files within your home given the paths.}}


== Plugins ==
== Plugins ==