From 6bb8dc85677e12a0fa7b76947826986a431e20a0 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Wed, 3 Apr 2024 16:07:08 +0200 Subject: [PATCH] will nfs work soon? --- profiles/mounts/common-zfs.nix | 15 +++++++++++++++ profiles/mounts/meconium-nfs.nix | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/profiles/mounts/common-zfs.nix b/profiles/mounts/common-zfs.nix index 61fe5fa..1d3ee41 100644 --- a/profiles/mounts/common-zfs.nix +++ b/profiles/mounts/common-zfs.nix @@ -32,4 +32,19 @@ # # zfs set sharenfs="ro=192.168.1.0/24,all_squash,anonuid=70,anongid=70" Meconium # # zfs set sharenfs="rw=192.168.1.0/24" Meconium services.nfs.server.enable = lib.mkDefault true; + + # TODO: move to common-nfs-server.nix + services.nfs.server = { + # fixed rpc.statd port; for firewall + lockdPort = 4001; + mountdPort = 4002; + statdPort = 4000; + extraNfsdConfig = ''''; + }; + networking.firewall = { + # for NFSv3; view with `rpcinfo -p` + allowedTCPPorts = [ 111 2049 4000 4001 4002 ]; # 20048 + allowedUDPPorts = [ 111 2049 4000 4001 4002 ]; # 20048 + }; + } diff --git a/profiles/mounts/meconium-nfs.nix b/profiles/mounts/meconium-nfs.nix index 7be3469..5415f5e 100644 --- a/profiles/mounts/meconium-nfs.nix +++ b/profiles/mounts/meconium-nfs.nix @@ -15,7 +15,7 @@ joinSets = sets: builtins.foldl' (l: r: l // r) {} sets; in joinSets ( # TODO: depend on nox.networking.interfaces.eno1.ipv4.addresses - (map (mkMount "/mnt/meconium" "192.168.1.9:/Meconium" ) [ + (map (mkMount "/mnt/meconium" "192.168.1.8:/Meconium" ) [ "" "/backups" "/backups/rocm"