Home Assistant: Difference between revisions

From NixOS Wiki
imported>Mic92
donate my configuration
imported>Fab
m Fix naming
Line 1: Line 1:
[https://www.home-assistant.io/ Home Assistant] is an open source home automation software that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts.  
[https://www.home-assistant.io/ Home Assistant] is an open source home automation software that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts.  


= Home-assistant with nginx as a reverse proxy =
= Home Assistant with nginx as a reverse proxy =


If you run a public home-assistant instance it is a good idea to enable ssl.
If you run a public Home Assistant instance it is a good idea to enable SSL/TLS.
The following configuration generates a certificate using letsencrypt:
The following configuration generates a certificate using letsencrypt:


Line 30: Line 30:
= Add custom lovelace modules =
= Add custom lovelace modules =


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


== Example configurations ==
== Example configurations ==


- [https://github.com/Mic92/dotfiles/tree/master/nixos/eve/modules/home-assistant Mic92's config]
- [https://github.com/Mic92/dotfiles/tree/master/nixos/eve/modules/home-assistant Mic92's config]

Revision as of 13:15, 13 December 2020

Home Assistant is an open source home automation software that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts.

Home Assistant with nginx as a reverse proxy

If you run a public Home Assistant instance it is a good idea to enable SSL/TLS. The following configuration generates a certificate using letsencrypt:

  services.nginx = {
    virtualHosts."hass.your-domain.tld" = {
      addSSL = true;
      enableACME = true;
      extraConfig = ''
        proxy_buffering off;
      '';
      locations."/".extraConfig = ''
        proxy_pass http://127.0.0.1:8123;
        proxy_set_header Host $host;
        proxy_redirect http:// https://;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
      '';
    };
  };

Add custom lovelace modules

This pull request describes how to add custom lovelace modules.

Example configurations

- Mic92's config