From 47245c4844124050512337020bc17ce0515379f4 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 21 Jan 2025 23:24:21 +0000 Subject: [PATCH] add subnet ip variable to fileserver and update secrets --- flake.lock | 8 ++++---- hosts/common/optional/fileserver/nfs-server/homeshare.nix | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index b46eaaf..9d5d0ac 100644 --- a/flake.lock +++ b/flake.lock @@ -539,11 +539,11 @@ }, "nix-secrets": { "locked": { - "lastModified": 1737453096, - "narHash": "sha256-vxVmBzoCMsUj8U9WeWM9+6r/fj02Fdi+1h/JVth1e54=", + "lastModified": 1737494768, + "narHash": "sha256-a1Wy0e7E6xpPgF2q3ysBMKN+0qoPZ0umdaNYXO+MP+4=", "ref": "refs/heads/master", - "rev": "0ba083a18deed72f72e52a38413977d19d23d053", - "revCount": 246, + "rev": "512145a45785b730dab4cecc441680c7dd3eca5e", + "revCount": 247, "type": "git", "url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git" }, diff --git a/hosts/common/optional/fileserver/nfs-server/homeshare.nix b/hosts/common/optional/fileserver/nfs-server/homeshare.nix index b6165dc..c1136c0 100644 --- a/hosts/common/optional/fileserver/nfs-server/homeshare.nix +++ b/hosts/common/optional/fileserver/nfs-server/homeshare.nix @@ -1,6 +1,7 @@ {configVars, ...}: let homeshareDataLocation = configVars.locations.homeshareDataLocation; + subnetIp = configVars.networking.addresses.subnet.ip; in { fileSystems."/srv/export/photos" = { device = "${homeshareDataLocation}/photos"; @@ -24,9 +25,9 @@ in { statdPort = 4000; extraNfsdConfig = ''''; exports = '' - /srv/export/photos 192.10.99.0/24(rw,sync,no_subtree_check) 10.0.10.0/24(rw,sync,no_subtree_check) - /srv/export/media 192.10.99.0/24(rw,sync,no_subtree_check) 10.0.10.0/24(rw,sync,no_subtree_check) - /srv/export/personal 192.10.99.0/24(rw,sync,no_subtree_check) 10.0.10.0/24(rw,sync,no_subtree_check) + /srv/export/photos ${subnetIp}/24(rw,sync,no_subtree_check) + /srv/export/media ${subnetIp}/24(rw,sync,no_subtree_check) + /srv/export/personal ${subnetIp}/24(rw,sync,no_subtree_check) ''; }; # open nfs ports