fix for zfs nfs share
This commit is contained in:
parent
2faacde406
commit
0ef91f571d
|
@ -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 = [
|
||||
|
|
|
@ -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}
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user