doc: add NFS file systems documentation (#509169)

This commit is contained in:
tomf
2026-07-17 00:09:29 +00:00
committed by GitHub
3 changed files with 62 additions and 0 deletions

View File

@@ -41,5 +41,6 @@ and non-critical by adding `options = [ "nofail" ];`.
```{=include=} sections
luks-file-systems.section.md
sshfs-file-systems.section.md
nfs-file-systems.section.md
overlayfs.section.md
```

View File

@@ -0,0 +1,52 @@
# NFS File Systems {#sec-nfs-file-systems}
[NFS][nfs] (Network File System) allows you to mount directories from remote machines over the network.
[nfs]: https://en.wikipedia.org/wiki/Network_File_System
[nfs-man]: https://man7.org/linux/man-pages/man5/nfs.5.html
To mount NFS filesystems persistently, use the `fileSystems` option:
```nix
{
fileSystems."/mnt/data" = {
device = "server.example.com:/export/data";
fsType = "nfs";
};
}
```
## Automounting {#sec-nfs-automount}
To have NFS filesystems mounted on-demand instead of at boot, add the `noauto` and `x-systemd.automount` options:
```nix
{
fileSystems."/mnt/data" = {
device = "server.example.com:/export/data";
fsType = "nfs";
options = [
"noauto"
"x-systemd.automount"
];
};
}
```
## Ad-hoc Mounting {#sec-nfs-adhoc}
To mount NFS filesystems ad-hoc using the `mount` command, enable NFS and required RPC services:
```nix
{
boot.supportedFilesystems = [ "nfs" ];
}
```
Then you can mount filesystems manually:
```shell
$ sudo mount -t nfs server.example.com:/export/data /mnt/data
```
For more information on NFS mount options, see the [nfs(5) man page][nfs-man].

View File

@@ -619,6 +619,15 @@
"sec-luks-file-systems-fido2-systemd": [
"index.html#sec-luks-file-systems-fido2-systemd"
],
"sec-nfs-file-systems": [
"index.html#sec-nfs-file-systems"
],
"sec-nfs-automount": [
"index.html#sec-nfs-automount"
],
"sec-nfs-adhoc": [
"index.html#sec-nfs-adhoc"
],
"sec-sshfs-file-systems": [
"index.html#sec-sshfs-file-systems"
],