From 8d69a14fb610e02bc90e8daf52a3d209505e5d72 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 19 Jan 2025 11:30:52 +0000 Subject: [PATCH] FEATURE: add nfs-clients for new fileserver --- .../common/optional/fileserver/nfs-client/homeshare.nix | 9 --------- hosts/common/optional/fileserver/nfs-client/media.nix | 6 +++--- hosts/common/optional/fileserver/nfs-client/personal.nix | 9 +++++++++ hosts/common/optional/fileserver/nfs-client/photos.nix | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 hosts/common/optional/fileserver/nfs-client/homeshare.nix create mode 100644 hosts/common/optional/fileserver/nfs-client/personal.nix diff --git a/hosts/common/optional/fileserver/nfs-client/homeshare.nix b/hosts/common/optional/fileserver/nfs-client/homeshare.nix deleted file mode 100644 index 902fe04..0000000 --- a/hosts/common/optional/fileserver/nfs-client/homeshare.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - fileSystems."/media/homeshare" = { - device = "10.0.10.30:/mnt/homeshare"; - fsType = "nfs"; - options = [ "noatime" "_netdev" ]; - }; -} - - diff --git a/hosts/common/optional/fileserver/nfs-client/media.nix b/hosts/common/optional/fileserver/nfs-client/media.nix index 7375f95..3e55822 100644 --- a/hosts/common/optional/fileserver/nfs-client/media.nix +++ b/hosts/common/optional/fileserver/nfs-client/media.nix @@ -1,8 +1,8 @@ {configVars, ...}: let - mediaDataMountPoint = configVars.locations.mediaDataMountPoint; + fileserverIp = configVars.networking.addresses.fileserver.ip; in { - fileSystems.${mediaDataMountPoint} = { - device = "10.0.10.30:/mnt/media"; + fileSystems."/media/media" = { + device = "${fileserverIp}:/srv/export/media"; fsType = "nfs"; options = ["noatime" "_netdev"]; }; diff --git a/hosts/common/optional/fileserver/nfs-client/personal.nix b/hosts/common/optional/fileserver/nfs-client/personal.nix new file mode 100644 index 0000000..f64af8f --- /dev/null +++ b/hosts/common/optional/fileserver/nfs-client/personal.nix @@ -0,0 +1,9 @@ +{configVars, ...}: let + fileserverIp = configVars.networking.addresses.fileserver.ip; +in { + fileSystems."/media/personal" = { + device = "${fileserverIp}:/srv/export/personal"; + fsType = "nfs"; + options = ["noatime" "_netdev"]; + }; +} diff --git a/hosts/common/optional/fileserver/nfs-client/photos.nix b/hosts/common/optional/fileserver/nfs-client/photos.nix index 13cad9f..df16a23 100644 --- a/hosts/common/optional/fileserver/nfs-client/photos.nix +++ b/hosts/common/optional/fileserver/nfs-client/photos.nix @@ -1,9 +1,9 @@ {configVars, ...}: let - photosDataMountPoint = configVars.locations.photosDataMountPoint; + fileserverIp = configVars.networking.addresses.fileserver.ip; in { - fileSystems.${photosDataMountPoint} = { - device = "10.0.10.30:/mnt/photos"; + fileSystems."/media/photos" = { + device = "${fileserverIp}:/srv/export/photos"; fsType = "nfs"; - options = ["noatime" "_netdev" "ro"]; + options = ["noatime" "_netdev"]; }; }