NFS: Difference between revisions
imported>Patryk27 No edit summary |
imported>Patryk27 mNo edit summary |
||
Line 10: | Line 10: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Then we have to either move our already-existing directories inside <code>/export</code> or bind-mount them there: | Then we have to either move our already-existing directories inside <code>/export</code> (using <code>mv</code> from the command line) or bind-mount them there: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
Line 36: | Line 36: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Having the filesystem ready, we can proceed to configure | Having the filesystem ready, we can proceed to configure the NFS server itself: | ||
<syntaxhighlight lang="nix">{ | <syntaxhighlight lang="nix">{ | ||
Line 48: | Line 48: | ||
''; | ''; | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
This configuration | This configuration exposes all our shares to 2 local IPs; you can find more examples at Gentoo's wiki [https://wiki.gentoo.org/wiki/NFSv4]. | ||
Other options are available on the [https://search.nixos.org/options?query=nfs NixOS option page] or via the <code>nixos-option</code> command. | Other options are available on the [https://search.nixos.org/options?query=nfs NixOS option page] or via the <code>nixos-option</code> command. |