switching all smb to nfs

This commit is contained in:
Matt Nish-Lapidus 2025-04-05 13:53:10 -04:00
parent 0420380240
commit a1434cee4e
2 changed files with 56 additions and 43 deletions

View file

@ -1,35 +1,36 @@
{ config, lib, pkgs, ... }:
{
services.rpcbind.enable = true; # needed for NFS
fileSystems =
let
automount-opts = "x-systemd.automount,noauto,users,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,noperm,uid=1000";
filez-opts = automount-opts + ",credentials=/etc/nixos/filez-secrets";
# media-server-opts = automount-opts + ",credentials=/etc/nixos/media-server-secrets";
opts = [ "nfsvers=4.1" "noatime" "noauto" ];
in {
"/mnt/filez/media" = {
device = "//Filez/Media";
fsType = "smb3";
options = [ "${filez-opts}" ];
device = "filez:/volume1/Media";
fsType = "nfs";
options = opts;
};
"/mnt/filez/music-production" = {
device = "//Filez/Music Production";
fsType = "smb3";
options = [ "${filez-opts}" ];
device = "filez:/volume1/Music Production";
fsType = "nfs";
options = opts;
};
"/mnt/filez/storage" = {
device = "//Filez/Storage";
fsType = "smb3";
options = [ "${filez-opts}" ];
device = "filez:/volume1/Storage";
fsType = "nfs";
options = opts;
};
"/mnt/filez/photos" = {
device = "//Filez/Photo Storage";
fsType = "smb3";
options = [ "${filez-opts}" ];
device = "filez:/volume1/Photo Storage";
fsType = "nfs";
options = opts;
};
};
}