changed nfs from fstab to autofs

This commit is contained in:
willifan 2024-10-25 18:39:50 +02:00
parent ad813fe996
commit 7982f05122

View file

@ -1,9 +1,18 @@
{ ... }: { pkgs, ... }:
{ {
fileSystems."/mnt/nfs" = { environment.systemPackages = with pkgs; [
device = "192.168.178.19:/roms"; nfs-utils
fsType = "nfs"; ];
services.autofs = {
enable = true;
autoMaster = let
mapConf = pkgs.writeText "auto.nfs" ''
roms -fstype=nfs4 192.168.178.19:/roms
'';
in ''
/mnt/nfs ${mapConf}
'';
}; };
} }