feat(pxe-boot): mount pxe-images NFS share and symlink to /srv/pxe/http/images

Adds modules/pxe-boot/mount-pxe-images.nix, which mounts
server.sweet.home:/tank/proxmox/pxe-images at /mnt/pxe-images via NFSv4.2
(x-systemd.automount on Proxmox VMs, nofail on LXC containers — same pattern
as docker/mount-data.nix). The pxe-boot build-type now imports this module and
replaces the previous local /srv/pxe/http/images directory rule with an L+
symlink pointing to /mnt/pxe-images, so large images (ISOs, disk images) live
on the NFS share rather than the host's own root disk.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-27 03:54:37 +10:00
co-authored by Claude Sonnet 4.6
parent 16d6baea5f
commit 321048626e
3 changed files with 37 additions and 5 deletions
+11 -4
View File
@@ -29,7 +29,7 @@ The host creates these directories with systemd tmpfiles:
```text
/srv/pxe
/srv/pxe/http
/srv/pxe/http/images
/srv/pxe/http/images -> /mnt/pxe-images (symlink to NFS share)
/srv/pxe/http/auto-installer
/srv/pxe/http/nixos-minimal
/srv/pxe/http/debian
@@ -39,9 +39,13 @@ The host creates these directories with systemd tmpfiles:
/srv/pxe/tftp
```
Mount shared image storage under `/srv/pxe/http`, preferably
`/srv/pxe/http/images` unless a menu entry expects files in a specific
directory such as `/srv/pxe/http/auto-installer`.
`/srv/pxe/http/images` is a symlink to `/mnt/pxe-images`, which is an NFSv4.2
mount of `server.sweet.home:/tank/proxmox/pxe-images`
(`modules/pxe-boot/mount-pxe-images.nix`). Place large images there (ISOs,
disk images) rather than on the pxe-boot host's own root disk. For an LXC
pxe-boot container the mount uses `nofail` (eager, non-blocking on server
unavailability); for a Proxmox VM it uses `x-systemd.automount` (lazy,
triggered on first access).
The HTTP iPXE chain is:
@@ -116,6 +120,9 @@ The SystemRescue entry expects the source ISO at:
/srv/pxe/http/images/systemrescue.iso
```
Since `/srv/pxe/http/images` is the NFS-backed symlink, place the ISO on the
NFS share at `server.sweet.home:/tank/proxmox/pxe-images/systemrescue.iso`.
The `stage-systemrescue.service` oneshot extracts that ISO into:
```text