From 2975de79e2ed9e74641515e5d1a2e5e027f1b427 Mon Sep 17 00:00:00 2001 From: FabricSoul Date: Thu, 5 Jun 2025 00:59:52 -0400 Subject: [PATCH] add: nfs config --- hosts/common/optional/nfs.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 hosts/common/optional/nfs.nix diff --git a/hosts/common/optional/nfs.nix b/hosts/common/optional/nfs.nix new file mode 100644 index 0000000..abfc7ea --- /dev/null +++ b/hosts/common/optional/nfs.nix @@ -0,0 +1,21 @@ +# hosts/common/optional/nfs.nix +{...}: { + # Enable NFS server + services.nfs.server = { + enable = true; + + # Define your exports + exports = '' + /nas 192.168.2.101(rw,sync,no_root_squash,no_subtree_check) + ''; + + # Enable NFSv4 (recommended) + # Remove this line if you need to stick with NFSv2/v3 only + createMountPoints = true; + }; + + # Ensure the directories exist + systemd.tmpfiles.rules = [ + "d /nas 0755 root root -" + ]; +}