initial home assistant change
This commit is contained in:
@@ -1,14 +1,28 @@
|
||||
{ ... }: {
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
containers.homeassistant = {
|
||||
volumes = [ "home-assistant:/config" ];
|
||||
environment.TZ = "Europe/Vienna";
|
||||
image = "ghcr.io/home-assistant/home-assistant:2023.9.3";
|
||||
extraOptions = [
|
||||
"--ip=10.42.97.20"
|
||||
"--device=/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0:/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0"
|
||||
];
|
||||
users.users.homeassistant = {
|
||||
isSystemUser = true;
|
||||
group = "homeassistant";
|
||||
home = "/var/lib/homeassistant";
|
||||
createHome = true;
|
||||
};
|
||||
users.groups.homeassistant = { };
|
||||
|
||||
# TODO: check if we can run docker service as other user than root
|
||||
virtualisation = {
|
||||
oci-containers.containers = {
|
||||
homeassistant = {
|
||||
autoStart = true;
|
||||
image = "ghcr.io/home-assistant/home-assistant:2023.9.3";
|
||||
volumes = [
|
||||
"/var/lib/homeassistant:/config"
|
||||
];
|
||||
environment.TZ = "Europe/Vienna";
|
||||
extraOptions = [
|
||||
"--network=server"
|
||||
"--mac-address=1a:c4:04:6e:29:01"
|
||||
"--device=/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0:/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -20,7 +34,7 @@
|
||||
proxy_buffering off;
|
||||
'';
|
||||
locations."/".extraConfig = ''
|
||||
proxy_pass http://127.0.0.1:8123;
|
||||
proxy_pass http://10.42.97.20:8123;
|
||||
proxy_set_header Host $host;
|
||||
proxy_redirect http:// https://;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
Reference in New Issue
Block a user