diff --git a/deploy.sh b/deploy.sh index daaa796..3d40ede 100644 --- a/deploy.sh +++ b/deploy.sh @@ -182,6 +182,13 @@ 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/; + TARGET_TPM="true" + TARGET_TPM_VERSION=\$(cat /sys/class/tpm/tpm0/tpm_version_major) +else + TARGET_TPM="false" +fi + HDD=1 DISK_DEVPATH=() DISK_NAME=() @@ -223,7 +230,9 @@ for var in \ TARGET_USB_CORAL \ TARGET_PCIE_CORAL \ TARGET_ZIGBEE_DEVICE \ - TARGET_INTERFACE; do + TARGET_INTERFACE \ + TARGET_TPM \ + TARGET_TPM_VERSION; do echo "export \${var}=\${!var}" >> "${TMPFILE}" done diff --git a/templates/nix-config/configuration.nix b/templates/nix-config/configuration.nix index 94a121a..e5280dd 100644 --- a/templates/nix-config/configuration.nix +++ b/templates/nix-config/configuration.nix @@ -94,6 +94,9 @@ podman podman-compose podman-tui + snapraid + mergerfs + mergerfs-tools ]; # Power savings diff --git a/templates/nix-config/disks/snapraid.nix b/templates/nix-config/disks/snapraid.nix index 8e47f68..c04bd9a 100644 --- a/templates/nix-config/disks/snapraid.nix +++ b/templates/nix-config/disks/snapraid.nix @@ -17,6 +17,7 @@ "func.getattr=newest" "fsname=mergerfs_data" "x-mount.mkdir" + "x-systemd.automount" "x-systemd.requires=local-fs.target" "x-systemd.after=network-online.target" ];