troubleshooting NFS shares

This commit is contained in:
Haak Saxberg 2022-08-11 15:13:23 -07:00
parent f5b6e307be
commit 35b60c250d
2 changed files with 8 additions and 11 deletions

View file

@ -77,8 +77,8 @@ in
services.nfs.server.enable = true; services.nfs.server.enable = true;
services.nfs.server.exports = '' services.nfs.server.exports = ''
/export 192.168.1.0/24(insecure,crossmnt,fsid=0) /export 192.168.1.0/24(insecure,crossmnt,no_subtree_check,fsid=0)
/export/storage 192.168.1.0/24(insecure) /export/storage 192.168.1.0/24(rw,sync,nohide,insecure)
''; '';
networking.firewall = { networking.firewall = {
@ -121,14 +121,5 @@ in
]; ];
}; };
}; };
systemd.services.my-service = {
after = [ "wireguard-key.service" ];
wants = [ "wireguard-key.service" ];
script = ''
export MY_SECRET=$(cat /run/keys/my-secret)
run-my-program
'';
};
}; };
} }

View file

@ -26,6 +26,12 @@
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/storage" = {
device = "192.168.1.168:/storage";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ];
};
swapDevices = swapDevices =
[{ device = "/dev/disk/by-uuid/97c769a2-55da-475a-8dc0-d74d8bbde514"; }]; [{ device = "/dev/disk/by-uuid/97c769a2-55da-475a-8dc0-d74d8bbde514"; }];