Update NFS mounts and Docker configuration for photos

- Update `photos.nix` to use `configVars.locations.photosDataMountPoint`
- Add `photosDataMountPoint` to `docker.nix` and configure bind mount
This commit is contained in:
Sam 2025-01-13 10:07:09 +00:00
parent d65f5e156b
commit 6d4b95fd2c
4 changed files with 16 additions and 7 deletions

View File

@ -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"];
};
}

View File

@ -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;

View File

@ -47,14 +47,17 @@ 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
../common/optional/nixos-containers/postgres.nix

View File

@ -10,6 +10,7 @@
bitcoinNodeContainerData = "/media/main-ssd/nix-bitcoin";
backupContainerData = "/media/main-ssd/backup";
postgresContainerData = "/media/main-ssd/postgresql";
photosDataMountPoint = "/media/photos";
};
}