From 379e71ca0b6478ba81b8d27cec8f6224c6f80b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Numbus?= Date: Sat, 3 Jan 2026 19:55:19 +0100 Subject: [PATCH] Try to get mergerFS working --- deploy.conf | 2 +- deploy.sh | 6 +++--- templates/nix-config/disks/content.nix | 1 + templates/nix-config/disks/parity.nix | 1 + templates/nix-config/disks/snapraid.nix | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/deploy.conf b/deploy.conf index b4fb812..6107dd1 100644 --- a/deploy.conf +++ b/deploy.conf @@ -16,4 +16,4 @@ HOME_ROUTER_IP="192.168.1.1" HOME_SERVER_IP="192.168.1.5" # SERVICES SETTINGS SELECTED_SERVICES=( "frigate" "gitea" "home-assistant" "immich" "it-tools" \ -"nextcloud" "passbolt" "pi-hole" ) \ No newline at end of file +"nextcloud" "passbolt" "pi-hole" "virtualization" ) \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index 6e75242..cd07906 100644 --- a/deploy.sh +++ b/deploy.sh @@ -182,7 +182,7 @@ ls /dev/serial/by-id/ 2>/dev/null | grep -i "zigbee" && TARGET_ZIGBEE_DEVICE=\$( TARGET_INTERFACE=\$(ip -4 route show default | awk '{print \$5}' | head -n1) -if ls -l /sys/class/tpm/tpm0/; then +if ls -l /sys/class/tpm/tpm0/ >/dev/null 2>&1; then TARGET_TPM="true" TARGET_TPM_VERSION=\$(cat /sys/class/tpm/tpm0/tpm_version_major) else @@ -527,7 +527,7 @@ EOF (envsubst < "templates/nix-config/disks/content.nix") >> final-nix-config/etc/nixos/disks/disko.nix SNAPRAID_CONTENT_FILES+=" \"/mnt/content-${j}/snapraid.content\""$'\n' SNAPRAID_DATA_DISKS+=" d${j} = \"/mnt/content-${j}\";"$'\n' - MERGERFS_DEPENDS+=" \"/mnt/content-${j}\""$'\n' + MERGERFS_REQ_DEPS+=" \"x-systemd.requires=/mnt/content-${j}\""$'\n' done echo -e "\n✅ Generated $CONTENT_DISK_NUMBER data disk configuration(s)." j=0 @@ -542,7 +542,7 @@ EOF export SNAPRAID_CONTENT_FILES export SNAPRAID_DATA_DISKS export SNAPRAID_PARITY_FILES - export MERGERFS_DEPENDS + export MERGERFS_REQ_DEPS envsubst < templates/nix-config/disks/snapraid.nix > final-nix-config/etc/nixos/disks/snapraid.nix fi # Close the disko.nix block diff --git a/templates/nix-config/disks/content.nix b/templates/nix-config/disks/content.nix index 37f58ef..11189af 100644 --- a/templates/nix-config/disks/content.nix +++ b/templates/nix-config/disks/content.nix @@ -18,6 +18,7 @@ type = "filesystem"; format = "xfs"; mountpoint = "/mnt/content-${j}"; + mountOptions = [ "noauto" "nofail" "x-systemd.automount" ]; }; }; }; diff --git a/templates/nix-config/disks/parity.nix b/templates/nix-config/disks/parity.nix index 924c413..0cf33d8 100644 --- a/templates/nix-config/disks/parity.nix +++ b/templates/nix-config/disks/parity.nix @@ -18,6 +18,7 @@ type = "filesystem"; format = "xfs"; mountpoint = "/mnt/parity-${j}"; + mountOptions = [ "noauto" "nofail" "x-systemd.automount" ]; }; }; }; diff --git a/templates/nix-config/disks/snapraid.nix b/templates/nix-config/disks/snapraid.nix index c04bd9a..5bcd2c5 100644 --- a/templates/nix-config/disks/snapraid.nix +++ b/templates/nix-config/disks/snapraid.nix @@ -11,6 +11,7 @@ "dropcacheonclose=true" "defaults" "noauto" + "nofail" "allow_other" "moveonenospc=1" "minfreespace=50G" @@ -18,8 +19,7 @@ "fsname=mergerfs_data" "x-mount.mkdir" "x-systemd.automount" - "x-systemd.requires=local-fs.target" - "x-systemd.after=network-online.target" +$MERGERFS_REQ_DEPS ]; };