fix for zfs nfs share

This commit is contained in:
Nathan Anderson 2024-03-18 11:06:33 -06:00
parent 2faacde406
commit 0ef91f571d
2 changed files with 12 additions and 12 deletions

View File

@ -28,21 +28,21 @@
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/zdata" = # fileSystems."/zdata" =
{ device = "zdata"; # { device = "zdata";
fsType = "zfs"; # fsType = "zfs";
}; # };
fileSystems."/zdata/zdata" = fileSystems."/nfs_export/kage" =
{ device = "zdata/zdata"; { device = "zdata/kage";
fsType = "zfs"; fsType = "zfs";
}; };
# Bind mount for nfs export # Bind mount for nfs export
fileSystems."/nfs_export/kage" = { # fileSystems."/nfs_export/kage" = {
device = "zdata/zdata/kage"; # device = "zdata/kage";
options = [ "bind" ]; # options = [ "bind" ];
}; # };
# change ownership of kage to be open # change ownership of kage to be open
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [

View File

@ -81,8 +81,8 @@ in
services.nfs.server = lib.mkIf srvConfig.nfsEnable { services.nfs.server = lib.mkIf srvConfig.nfsEnable {
enable = true; enable = true;
exports = '' exports = ''
${srvConfig.nfsRoot} 192.168.1.1/24(rw,fsid=root,no_subtree_check,all_squash,anonuid=1001,anongid=1001) ${srvConfig.nfsRoot} 192.168.1.1/24(rw,fsid=root,no_subtree_check)
${lib.concatMapStringsSep "\n" (n: "${srvConfig.nfsRoot}${n} 192.168.1.1/24(rw,no_subtree_check,nohide,all_squash,anonuid=1001,anongid=1001)") srvConfig.nfsExports} ${lib.concatMapStringsSep "\n" (n: "${srvConfig.nfsRoot}${n} 192.168.1.1/24(rw,no_subtree_check,nohide)") srvConfig.nfsExports}
''; '';
}; };