summarylogtreecommitdiffstats
path: root/hass.service
diff options
context:
space:
mode:
authorBrainDamage2023-01-23 09:47:39 +0100
committerBrainDamage2023-01-23 09:47:39 +0100
commit30f4ea9700f4e37e90b6d3df8f93e33ecc2e3697 (patch)
tree4355a4c8ae97aff5cd38a285829eb4ee09b491d4 /hass.service
parent71b23d8b298ee82921218af18f800d45d29828a5 (diff)
downloadaur-30f4ea9700f4e37e90b6d3df8f93e33ecc2e3697.tar.gz
move the installation to a virtual env so it's fully self contained in a single path, out of tree from the config
enable rust python cryptography compilation move cache path to system's cache added python-wheen to deps to build several packages added rust to deps
Diffstat (limited to 'hass.service')
-rw-r--r--hass.service16
1 files changed, 11 insertions, 5 deletions
diff --git a/hass.service b/hass.service
index 46e9c29ee1f8..94695b02a7f3 100644
--- a/hass.service
+++ b/hass.service
@@ -9,15 +9,21 @@ Restart=on-failure
User=hass
Group=hass
LogsDirectory=hass
-StateDirectory=hass
+StateDirectory=hass hass-installation
+CacheDirectory=hass
+Environment=CARGO_HOME=%C/hass/cargo
+Environment=PYTHON_EGG_CACHE=%C/hass/python-eggs
+Environment=VIRTUAL_ENV=%S/hass-installation
+Environment=XDG_CACHE_HOME=%C/hass
WorkingDirectory=~
EnvironmentFile=-/etc/hass.env
-ExecStart=python -m homeassistant \
- --config "." \
- --log-file "${LOGS_DIRECTORY}/home-assistant.log" \
- --log-rotate-days 1
+ExecStart=%S/hass-installation/bin/python -m homeassistant \
+ --config "." \
+ --log-file "${LOGS_DIRECTORY}/home-assistant.log" \
+ --log-rotate-days 1
+
RestartForceExitStatus=100
LockPersonality=true