Home Assistant: Difference between revisions
→Virtual machine: Add incus example article |
Link to relevant Nixcademy tutorial |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 197: | Line 197: | ||
We provide a way to declaratively manage custom lovelace modules through the NixOS module with the [https://search.nixos.org/options?channel=unstable&show=services.home-assistant.customLovelaceModules&from=0&size=50&sort=relevance&type=packages&query=home-assistant services.home-assistant.customLovelaceModules] option. | We provide a way to declaratively manage custom lovelace modules through the NixOS module with the [https://search.nixos.org/options?channel=unstable&show=services.home-assistant.customLovelaceModules&from=0&size=50&sort=relevance&type=packages&query=home-assistant services.home-assistant.customLovelaceModules] option. | ||
When a custom module is configured, the generated Home Assistant configuration file (eg. <code>/var/lib/hass/configuration.yaml</code>) will list the module in the <code>lovelace</code> config section as a new resource. If your lovelace configuration mode is <code>yaml</code>, the custom module should be loaded automatically. | |||
However, if your lovelace configuration mode is <code>storage</code> (the default), then the Home Assistant lovelace module will ignore the custom module resource. In that case you additionally need to add the custom module through the lovelace UI in the Resources tab with its path like <code>/local/nixos-lovelace-modules/<module-entrypoint></code>. | |||
Available custom components can be found under [https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=home-assistant-custom-lovelace-modules pkgs.home-assistant-custom-lovelace-modules]. | |||
= Tracking the latest release = | = Tracking the latest release = | ||
| Line 526: | Line 530: | ||
</syntaxhighlight>If you did not create any automations through the UI, Home Assistant will fail loading because the <code>automations.yaml</code> file does not exist yet, and it will fail including it. To avoid that, add a systemd tmpfiles.d rule: | </syntaxhighlight>If you did not create any automations through the UI, Home Assistant will fail loading because the <code>automations.yaml</code> file does not exist yet, and it will fail including it. To avoid that, add a systemd tmpfiles.d rule: | ||
< | <syntaxhighlight lang="nix"> | ||
systemd.tmpfiles.rules = [ | systemd.tmpfiles.rules = [ | ||
"f ${config.services.home-assistant.configDir}/automations.yaml | "f ${config.services.home-assistant.configDir}/automations.yaml 0644 hass hass" | ||
]; | ]; | ||
</ | </syntaxhighlight> | ||
== Trust a private certificate authority == | == Trust a private certificate authority == | ||
| Line 562: | Line 566: | ||
When developing Home Assistant for some test dependencies additional libraries are needed. | When developing Home Assistant for some test dependencies additional libraries are needed. | ||
A nix-shell expression for this is available [https://github.com/nix-community/nix-environments/tree/master/envs/home-assistant here]. | A nix-shell expression for this is available [https://github.com/nix-community/nix-environments/tree/master/envs/home-assistant here]. | ||
= Further reading = | |||
* [https://nixcademy.com/posts/auto-update-containers/ Run and Auto-Update Docker (Home Assistant) Containers on NixOS], Nixcademy | |||
[[Category:Applications]] | [[Category:Applications]] | ||