Home Assistant: Difference between revisions

imported>Mweinelt
imported>Mweinelt
Line 92: Line 92:


There are many useful and pretty lovelace components out there that you might want to integrate into your dashboards. Some of them are packaged up inside NUR repositories.
There are many useful and pretty lovelace components out there that you might want to integrate into your dashboards. Some of them are packaged up inside NUR repositories.
Usually you would install these into <code>/var/lib/hass/www</code>, but that comes with issues on NixOS, as their internal webserver does not follow symlinks. You could then think about exposing that directory over your webserver, but you'll notice that your webserver user has no permissions to enter the home assistant users state directory, which is due to proper hardening on the <code>home-assistant.service</code>.


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 120: Line 122:
       (mkLovelaceModule "multiple-entity-row") # https://github.com/benct/lovelace-multiple-entity-row
       (mkLovelaceModule "multiple-entity-row") # https://github.com/benct/lovelace-multiple-entity-row
     ];
     ];
  };
  services.nginx.virtualHosts."home.example.com" = {
    locations."/local/" = {
      alias = "/run/hass/";
    };
   };
   };
}
}


</syntaxHighlight>
</syntaxHighlight>
This [https://github.com/NixOS/nixpkgs/pull/89136 pull request] describes how to add custom lovelace modules.


== Add custom components ==
== Add custom components ==