diff options
| author | Joe Mou <dev@mou.fo> | 2024-06-11 16:34:08 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2024-10-09 13:48:40 -0400 |
| commit | 70a6d533227ea2284bdcc1514b794f99d7eb5361 (patch) | |
| tree | c30dd37ea2c37667ca5fa286851fc344d03c1500 /hostnix/elmo/home-assistant.nix | |
| parent | b04eec18b977ab7303bd0ccbd9adaf86f4f3a5a6 (diff) | |
Upgrade to NixOS 24.05
To resolve database collation version mismatches ("The database was
created using collation version 2.38, but the operating system provides
version 2.39."):
$ sudo -u postgres psql
> \c hass
> REINDEX DATABASE hass;
> ALTER DATABASE hass REFRESH COLLATION VERSION;
[ Repeat for all databases (except special database template0) ]
Diffstat (limited to 'hostnix/elmo/home-assistant.nix')
| -rw-r--r-- | hostnix/elmo/home-assistant.nix | 54 |
1 files changed, 5 insertions, 49 deletions
diff --git a/hostnix/elmo/home-assistant.nix b/hostnix/elmo/home-assistant.nix index 5299508..4be7c6a 100644 --- a/hostnix/elmo/home-assistant.nix +++ b/hostnix/elmo/home-assistant.nix @@ -22,53 +22,9 @@ "vesync" ]; # https://nathan.gs/2023/12/28/home-assistant-add-a-custom-component-in-nixos-revisited/ - customComponents = [ - ( - pkgs.buildHomeAssistantComponent rec { - owner = "BeryJu"; - domain = "auth_header"; - version = "1.10"; - src = pkgs.fetchFromGitHub { - inherit owner; - repo = "hass-auth-header"; - rev = "refs/tags/v${version}"; - hash = "sha256-dSmY3d8Kx0pXl+20dTGAYgjSH6OhNh53jPX7VLCZs7Y="; - }; - dontBuild = true; - } - ) - ( - pkgs.buildHomeAssistantComponent rec { - owner = "make-all"; - domain = "tuya_local"; - version = "2024.2.0"; - src = pkgs.fetchFromGitHub { - inherit owner; - repo = "tuya-local"; - rev = "refs/tags/${version}"; - hash = "sha256-wNdATRXJNHusVO2fMUXqSz0EZRDpodORSuFRXL6ohUs="; - }; - propagatedBuildInputs = with pkgs.home-assistant.python.pkgs; [ - ( - buildPythonPackage rec { - pname = "tinytuya"; - version = "1.13.1"; - format = "wheel"; - src = pkgs.fetchPypi { - inherit pname version format; - hash = "sha256-j7t4P4U9iuVHyb6HASkf7LmBheHN32IjdKE60HUbjIE="; - }; - propagatedBuildInputs = [ - colorama - cryptography - requests - ]; - } - ) - ]; - dontBuild = true; - } - ) + customComponents = with pkgs.home-assistant-custom-components; [ + auth-header + tuya_local ]; config = { default_config = { }; @@ -595,7 +551,7 @@ # This is frequently used in examples but without clear explanation. It # might help with WebSockets. proxy_buffering off; - # oauth2_proxy NixOS module sets some non-standard headers, but we need + # oauth2-proxy NixOS module sets some non-standard headers, but we need # the preferred_username claim. auth_request_set $preferred_username $upstream_http_x_auth_request_preferred_username; proxy_set_header X-Forwarded-Preferred-Username $preferred_username; @@ -617,5 +573,5 @@ }; }; - services.oauth2_proxy.nginx.virtualHosts = [ "ha.mou.fo" ]; + services.oauth2-proxy.nginx.virtualHosts = { "ha.mou.fo" = {}; }; } |
