fix(rpi4): set up deconz

This commit is contained in:
Felix Schröter 2020-10-07 14:37:57 +02:00
parent 2f33e6835a
commit 2a135612ab
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58
4 changed files with 205 additions and 1 deletions

View file

@ -1,9 +1,38 @@
{ config, pkgs, ... }:
with pkgs;
let
pydeconz = python3.pkgs.buildPythonPackage rec {
pname = "pydeconz";
version = "73";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "Lm7J0p2dp2gyesDpgN0WGpxPewC1z/IUy0CDEqofQGA=";
};
propagateBuildInputs = with python3Packages; [ setuptools ];
buildInputs = with python3Packages; [ aiohttp ];
doCheck = false;
};
in
{
imports = [ ./deconz.nix ];
environment.systemPackages = with pkgs; [ deconz ];
local.services.deconz = {
enable = true;
httpPort = 8080;
wsPort = 1443;
openFirewall = true;
};
services.home-assistant = {
enable = true;
package = home-assistant.override {
extraPackages = ps: with ps; [ pydeconz ];
};
openFirewall = true;
config = {
homeassistant = {
@ -28,6 +57,11 @@ with pkgs;
mqtt_topic = "owntracks/#";
secret = "!secret owntracks_secret";
};
deconz = {
host = "localhost";
port = 8080;
api_key = "!secret deconz_apikey";
};
};
# configWritable = true; # doesn't work atm
};