diff --git a/hosts/common/optional/nfs-mounts/photos.nix b/hosts/common/optional/nfs-mounts/photos.nix index 4198dcb..13cad9f 100644 --- a/hosts/common/optional/nfs-mounts/photos.nix +++ b/hosts/common/optional/nfs-mounts/photos.nix @@ -1,9 +1,9 @@ -{ - fileSystems."/media/photos" = { +{configVars, ...}: let + photosDataMountPoint = configVars.locations.photosDataMountPoint; +in { + fileSystems.${photosDataMountPoint} = { device = "10.0.10.30:/mnt/photos"; fsType = "nfs"; - options = [ "noatime" "_netdev" "ro" ]; + options = ["noatime" "_netdev" "ro"]; }; } - - diff --git a/hosts/common/optional/nixos-containers/docker.nix b/hosts/common/optional/nixos-containers/docker.nix index 1439328..64fdf01 100644 --- a/hosts/common/optional/nixos-containers/docker.nix +++ b/hosts/common/optional/nixos-containers/docker.nix @@ -10,6 +10,7 @@ gatewayIp = configVars.networking.addresses.gateway.ip; dockerContainerData = configVars.locations.dockerContainerData; mediaDataMountPoint = configVars.locations.mediaDataMountPoint; + photosDataMountPoint = configVars.locations.photosDataMountPoint; pubKeys = lib.filesystem.listFilesRecursive ../../users/keys; arion = inputs.arion; sops-nix = inputs.sops-nix; @@ -73,6 +74,10 @@ in { hostBridge = "br0"; nixpkgs = pkgs.path; bindMounts = { + "/media/photos" = { + hostPath = photosDataMountPoint; + isReadOnly = false; + }; "/dev/dri" = { hostPath = "/dev/dri"; isReadOnly = false; diff --git a/hosts/semita/default.nix b/hosts/semita/default.nix index bf17609..e3f428a 100644 --- a/hosts/semita/default.nix +++ b/hosts/semita/default.nix @@ -47,13 +47,16 @@ in { ../common/optional/pipewire.nix ../common/optional/openssh.nix ../common/optional/dwm.nix - ../common/optional/nfs-mounts/media.nix - ../common/optional/nfs-mounts/homeshare.nix ../common/optional/printing.nix ../common/optional/docker.nix ../common/optional/nix-ld.nix ../common/optional/gaming.nix ../common/optional/restic-backup.nix + + # nfs mounts + ../common/optional/nfs-mounts/media.nix + ../common/optional/nfs-mounts/homeshare.nix + ../common/optional/nfs-mounts/photos.nix # nixos-containers ../common/optional/nixos-containers/nix-bitcoin.nix diff --git a/vars/default.nix b/vars/default.nix index a25e3ac..830b61f 100644 --- a/vars/default.nix +++ b/vars/default.nix @@ -10,6 +10,7 @@ bitcoinNodeContainerData = "/media/main-ssd/nix-bitcoin"; backupContainerData = "/media/main-ssd/backup"; postgresContainerData = "/media/main-ssd/postgresql"; + photosDataMountPoint = "/media/photos"; }; }