summaryrefslogtreecommitdiff
path: root/hostnix/elmo/home-assistant.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hostnix/elmo/home-assistant.nix')
-rw-r--r--hostnix/elmo/home-assistant.nix54
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" = {}; };
}