Fixed if statement. Added separate disk-spindown file.
This commit is contained in:
@@ -164,8 +164,10 @@ files_generation() {
|
||||
FRIGATE_DEVICES_BLOCK=""
|
||||
if [[ "$TARGET_GRAPHICS_RENDERER" == "true" ]]; then
|
||||
FRIGATE_DEVICES_BLOCK+=" - /dev/dri:/dev/dri\n"
|
||||
fi
|
||||
if [[ "$TARGET_USB_CORAL" == "true" ]]; then
|
||||
FRIGATE_DEVICES_BLOCK+=" - /dev/bus/usb:/dev/bus/usb\n"
|
||||
fi
|
||||
if [[ -n "$FRIGATE_DEVICES_BLOCK" ]]; then
|
||||
REPLACEMENT="devices:\n${FRIGATE_DEVICES_BLOCK%\\n}"
|
||||
sed -i.bak "s|# --- frigate devices --- #|$REPLACEMENT|" ./config-files/docker/compose/frigate.nix
|
||||
@@ -203,6 +205,7 @@ files_generation() {
|
||||
IMMICH_DEVICES_BLOCK=""
|
||||
if [[ "$TARGET_GRAPHICS_RENDERER" == "true" ]]; then
|
||||
IMMICH_DEVICES_BLOCK+=" - /dev/dri:/dev/dri\n"
|
||||
fi
|
||||
if [[ -n "$IMMICH_DEVICES_BLOCK" ]]; then
|
||||
REPLACEMENT="devices:\n${IMMICH_DEVICES_BLOCK%\\n}"
|
||||
sed -i.bak "s|# --- immich devices --- #|$REPLACEMENT|" ./config-files/docker/compose/immich.nix
|
||||
@@ -521,6 +524,10 @@ EOF
|
||||
fi
|
||||
|
||||
cp -avu ./config-files/disks/snapraid.nix ./nixos-config/disks/
|
||||
|
||||
if [[ -n "${DISK_ID_LIST[@]}" ]]; then
|
||||
sed -i "s|DISK_ID_LIST|${DISK_ID_LIST[@]}|" ./config-files/disks/spindown.nix
|
||||
cp -avu ./config-files/disks/spindown.nix ./nixos-config/disks/spindown.nix
|
||||
### Generate automatic unlock configuration <--
|
||||
|
||||
### --> Generate unlock keys
|
||||
|
||||
Reference in New Issue
Block a user