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.gentoo
parent
d6580cfdf4
commit
b1afb4adf1
|
@ -37,7 +37,7 @@ usr/share/aclocal
|
|||
usr/share/baselayout
|
||||
usr/share/bash-completion
|
||||
usr/share/doc
|
||||
usr/share/factory
|
||||
usr/share/factory/etc
|
||||
usr/share/gdb
|
||||
usr/share/info
|
||||
usr/share/locale/*/*/*python*
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
[Unit]
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Container]
|
||||
Image=ghcr.io/home-assistant/yellow-homeassistant:stable
|
||||
Network=host
|
||||
Volume=/var/lib/homeassistant:/config:Z
|
||||
User=300
|
||||
Group=300
|
||||
ReadOnly=true
|
||||
VolatileTmp=yes
|
||||
|
||||
[Service]
|
||||
TimeoutStartSec=5min
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,2 @@
|
|||
u homeassistant 300 "Home Assistant" /var/lib/homeassistant /bin/sh
|
||||
g homeassistant 300
|
|
@ -0,0 +1,8 @@
|
|||
v /var/lib/homeassistant 0700 homeassistant homeassistant - -
|
||||
C /var/lib/homeassistant/automations.yaml - - - -
|
||||
C /var/lib/homeassistant/configuration.yaml - - - -
|
||||
C /var/lib/homeassistant/groups.yaml - - - -
|
||||
C /var/lib/homeassistant/http.yaml - - - -
|
||||
C /var/lib/homeassistant/scenes.yaml - - - -
|
||||
C /var/lib/homeassistant/scripts.yaml - - - -
|
||||
C /var/lib/homeassistant/secrets.yaml - - - -
|
|
@ -0,0 +1 @@
|
|||
[]
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
|||
server_host: '::1'
|
||||
trusted_proxies:
|
||||
- '::1'
|
||||
use_x_forwarded_for: true
|
|
@ -0,0 +1 @@
|
|||
{}
|
Loading…
Reference in New Issue