From 0ef91f571d1d613c08f8e468b2894a197e7f2606 Mon Sep 17 00:00:00 2001 From: Nathan Anderson Date: Mon, 18 Mar 2024 11:06:33 -0600 Subject: [PATCH] fix for zfs nfs share --- luci/nixos/hardware-configuration.nix | 20 ++++++++++---------- shared/server-configuration.nix | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/luci/nixos/hardware-configuration.nix b/luci/nixos/hardware-configuration.nix index 4aafcef..98b9505 100644 --- a/luci/nixos/hardware-configuration.nix +++ b/luci/nixos/hardware-configuration.nix @@ -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 = [ diff --git a/shared/server-configuration.nix b/shared/server-configuration.nix index f77b003..c0ee9ce 100644 --- a/shared/server-configuration.nix +++ b/shared/server-configuration.nix @@ -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} ''; };