service/home-automation: add shelly component

This commit is contained in:
Felix Buehler 2023-11-29 20:22:40 +01:00
parent fbec192d33
commit aed19edcb6

View file

@ -110,6 +110,7 @@ in
extraComponents = [ extraComponents = [
"backup" "backup"
"esphome" "esphome"
"shelly"
"prometheus" "prometheus"
] ++ cfg.extraComponents; ] ++ cfg.extraComponents;
}; };
@ -132,6 +133,14 @@ in
esphome.enable = true; esphome.enable = true;
}; };
# TODO remove after merge + backport: https://github.com/NixOS/nixpkgs/pull/270519
systemd.services.esphome.serviceConfig = {
ProtectHostname = lib.mkForce false;
ProtectKernelLogs = lib.mkForce false;
ProtectKernelTunables = lib.mkForce false;
ProcSubset = lib.mkForce "all";
};
my.services.prometheus.rules = { my.services.prometheus.rules = {
homeassistant = { homeassistant = {
condition = ''homeassistant_entity_available{domain="persistent_notification", entity!~"persistent_notification.http_login|persistent_notification.recorder_database_migration"} >= 0''; condition = ''homeassistant_entity_available{domain="persistent_notification", entity!~"persistent_notification.http_login|persistent_notification.recorder_database_migration"} >= 0'';