diff options
Diffstat (limited to 'makefu/2configs/bureautomation')
-rw-r--r-- | makefu/2configs/bureautomation/default.nix | 26 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/deps/dwd_pollen.nix | 32 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/kalauerbot.nix | 3 |
3 files changed, 5 insertions, 56 deletions
diff --git a/makefu/2configs/bureautomation/default.nix b/makefu/2configs/bureautomation/default.nix index 9b33595f4..cd598f0aa 100644 --- a/makefu/2configs/bureautomation/default.nix +++ b/makefu/2configs/bureautomation/default.nix @@ -15,30 +15,8 @@ in { ]; networking.firewall.allowedTCPPorts = [ 8123 ]; state = [ "/var/lib/hass/known_devices.yaml" ]; - services.home-assistant = let - dwd_pollen = pkgs.fetchFromGitHub { - owner = "marcschumacher"; - repo = "dwd_pollen"; - rev = "0.1"; - sha256 = "1af2mx99gv2hk1ad53g21fwkdfdbymqcdl3jvzd1yg7dgxlkhbj1"; - }; - in { + services.home-assistant = { enable = true; - package = (pkgs.home-assistant.overrideAttrs (old: { - # TODO: find correct python package - installCheckPhase = '' - echo LOLLLLLLLLLLLLLL - ''; - postInstall = '' - cp -r ${dwd_pollen} $out/lib/python3.7/site-packages/homeassistant/components/dwd_pollen - ''; - })).override { - extraPackages = ps: with ps; [ - pkgs.picotts - python-forecastio jsonrpc-async jsonrpc-websocket mpd2 - (callPackage ./deps/openwrt-luci-rpc.nix { }) - ]; - }; autoExtraComponents = true; config = { config = {}; @@ -139,7 +117,7 @@ in { sensor = [] ++ [{ platform = "version"; }] # pyhaversion - ++ (import ./sensor/pollen.nix) + # ++ (import ./sensor/pollen.nix) ++ (import ./sensor/espeasy.nix) ++ (import ./sensor/airquality.nix) ++ ((import ./sensor/outside.nix) {inherit lib;}) diff --git a/makefu/2configs/bureautomation/deps/dwd_pollen.nix b/makefu/2configs/bureautomation/deps/dwd_pollen.nix deleted file mode 100644 index 39d9c3069..000000000 --- a/makefu/2configs/bureautomation/deps/dwd_pollen.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, python -, voluptuous -}: - -buildPythonPackage rec { - format = "other"; - pname = "dwd_pollen"; - version = "0.1"; - - src = fetchFromGitHub { - owner = "marcschumacher"; - repo = "dwd_pollen"; - rev = version; - sha256 = "1af2mx99gv2hk1ad53g21fwkdfdbymqcdl3jvzd1yg7dgxlkhbj1"; - }; - propagatedBuildInputs = [ - voluptuous - ]; - installPhase = '' - install -D -t $out/${python.sitePackages}/homeassistant/components/sensor/dwd_pollen * - ''; - - meta = with lib; { - description = "Home Assistant component to retrieve Pollen data from DWD (Germany)"; - homepage = https://github.com/marcschumacher/dwd_pollen; - license = licenses.mit; - maintainers = [ maintainers.makefu ]; - }; -} diff --git a/makefu/2configs/bureautomation/kalauerbot.nix b/makefu/2configs/bureautomation/kalauerbot.nix index d61b8885e..ff045e2f3 100644 --- a/makefu/2configs/bureautomation/kalauerbot.nix +++ b/makefu/2configs/bureautomation/kalauerbot.nix @@ -12,6 +12,9 @@ WorkingDirectory = "/var/lib/kalauerbot"; ExecStart = "${pkgs.kalauerbot}/bin/kalauerbot"; PrivateTmp = true; + + Restart = "always"; + RuntimeMaxSec = "12h"; }; }; } |