Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
60 lines
1.6 KiB
Nix
60 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
buildHomeAssistantComponent,
|
|
fetchFromGitHub,
|
|
construct,
|
|
paho-mqtt,
|
|
numpy,
|
|
cryptography,
|
|
psutil-home-assistant,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildHomeAssistantComponent rec {
|
|
owner = "XiaoMi";
|
|
domain = "xiaomi_home";
|
|
version = "0.4.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "XiaoMi";
|
|
repo = "ha_xiaomi_home";
|
|
rev = "v${version}";
|
|
hash = "sha256-X8AP2pFGhkh4f72+pORXBB8yOqgIqJ+SLrQx5gwKxEg=";
|
|
};
|
|
|
|
dependencies = [
|
|
construct
|
|
paho-mqtt
|
|
numpy
|
|
cryptography
|
|
psutil-home-assistant
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=^v([0-9.]+)$" ]; };
|
|
|
|
meta = {
|
|
changelog = "https://github.com/XiaoMi/ha_xiaomi_home/releases/tag/v${version}";
|
|
description = "Xiaomi Home Integration for Home Assistant";
|
|
longDescription = ''
|
|
Xiaomi Home Integration for Home Assistant depends on additional components, example how to setup in NixOS `configuration.nix`:
|
|
|
|
```
|
|
{ config, lib, pkgs, ... }:
|
|
{
|
|
services.home-assistant = {
|
|
customComponents = [ pkgs.home-assistant-custom-components.xiaomi_home ];
|
|
extraComponents = [ "ffmpeg" "zeroconf" ];
|
|
};
|
|
# OAuth2 Redirect URL is hardcoded as http://homeassistant.local:8123
|
|
# Make sure you can access HA via this URL with mDNS
|
|
services.avahi.hostName = "homeassistant";
|
|
networking.firewall.allowedTCPPorts = [ 8123 ];
|
|
}
|
|
```
|
|
'';
|
|
homepage = "https://github.com/XiaoMi/ha_xiaomi_home";
|
|
maintainers = with lib.maintainers; [ MakiseKurisu ];
|
|
license = lib.licenses.unfree;
|
|
};
|
|
}
|