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";
};
fileSystems."/zdata" =
{ device = "zdata";
fsType = "zfs";
};
# fileSystems."/zdata" =
# { device = "zdata";
# fsType = "zfs";
# };
fileSystems."/zdata/zdata" =
{ device = "zdata/zdata";
fileSystems."/nfs_export/kage" =
{ device = "zdata/kage";
fsType = "zfs";
};
# Bind mount for nfs export
fileSystems."/nfs_export/kage" = {
device = "zdata/zdata/kage";
options = [ "bind" ];
};
# fileSystems."/nfs_export/kage" = {
# device = "zdata/kage";
# options = [ "bind" ];
# };
# change ownership of kage to be open
systemd.tmpfiles.rules = [

View File

@ -81,8 +81,8 @@ in
services.nfs.server = lib.mkIf srvConfig.nfsEnable {
enable = true;
exports = ''
${srvConfig.nfsRoot} 192.168.1.1/24(rw,fsid=root,no_subtree_check,all_squash,anonuid=1001,anongid=1001)
${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}
${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)") srvConfig.nfsExports}
'';
};