Configure Home Assistant Podman container

The default Home Assistant configuration does not allow running a
reverse proxy in front of the application.  To enable this, the
`use_x_forwarded_for` and `trusted_proxies` options have to be set.

Since we want `/var/lib/homeassistant` to be a Btrfs subvolume, we can't
simply include the necessary files in the correct location in the rootfs
image.  Instead, we must define "copy tree" (`C`) actions for
`systemd-tmpfiles` to copy them from `/usr/share/factory`.
Unfortunately, `systemd-tmpfiles` considers `v` and `C` actions
conflicting, and thus will not copy the directory contents recursively.
Each file has to be listed explicitly.
This commit is contained in:
2023-03-26 12:15:50 -05:00
parent d6580cfdf4
commit b1afb4adf1
11 changed files with 50 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
http: !include http.yaml
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

View File

@@ -0,0 +1,4 @@
server_host: '::1'
trusted_proxies:
- '::1'
use_x_forwarded_for: true