I’m attempting to mount a local nfs server and I’m not sure what’s preventing it. Rebuilding the system doesn’t spit out an error, but the mount directory remains empty.
I have also installed nfs-utils (is this needed?) and disabled the firewall.
If I attempt to do a manual mount, it doesn’t seem to be able to find it:
mount -t nfs 192.168.1.245:/DATA /mnt/nfs
mount.nfs: No such device
The path is correct, the server is online, and I can view it from a different machine.
Systemctl shows the service as exited:
systemctl list-units --type=service | grep nfs
nfs-idmapd.service loaded active running NFSv4 ID-name mapping service
nfs-mountd.service loaded active running NFS Mount Daemon
nfs-server.service loaded active exited NFS server and services
nfsdcld.service loaded active running NFSv4 Client Tracking Daemon
Not sure what the problem is here but I can offer that the services and utilities shouldn’t be necessary. I’ve been able to mount TrueNAS NFS shares with just the fileSystems declaration, and rpcbind.service seems to have been started automatically.
i wonder if nixos service modules can check for the existence or kernel modules in the nixos , in theory it just has to evaluate config. and see if those modules are enabled in the kernel, and warn if they are not…
For anyone finding this later, trying to do a simply mount from the command line but getting an error like this:
bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.
dmesg(1) may have more information after failed mount system call.
All I needed was this in my configuration.nix was this: