From 78fc347be0a0b680bd39a72ac94418d211f5d777 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 18 Nov 2020 22:23:33 +0100 Subject: ma ham: use new home-assistant merge function --- makefu/2configs/ham/default.nix | 66 +++++++++++------------------------------ 1 file changed, 18 insertions(+), 48 deletions(-) (limited to 'makefu/2configs/ham/default.nix') diff --git a/makefu/2configs/ham/default.nix b/makefu/2configs/ham/default.nix index 3a6d1952..44a36c0a 100644 --- a/makefu/2configs/ham/default.nix +++ b/makefu/2configs/ham/default.nix @@ -4,39 +4,27 @@ ## wake-on-lan server ## let - upkgs = (import {}).pkgs; - hlib = (import ./lib); - prefix = hlib.prefix; - tasmota = hlib.tasmota; + prefix = (import ./lib).prefix; firetv_stick = "192.168.1.24"; hassdir = "/var/lib/hass"; - zigbee = import ./multi/zigbee2mqtt.nix; - #flurlicht = import ./multi/flurlicht.nix; - kurzzeitwecker = import ./multi/kurzzeitwecker.nix; - firetv_restart = import ./multi/firetv_restart.nix; - the_playlist = import ./multi/the_playlist.nix; - fliegen-counter = import ./multi/fliegen-couter.nix; -# switch -# automation -# binary_sensor -# sensor -# input_select -# timer in { imports = [ ./mqtt.nix + ./zigbee2mqtt/default.nix + + # hass config + ./zigbee2mqtt/hass.nix + # ./multi/flurlicht.nix + ./multi/kurzzeitwecker.nix + ./multi/the_playlist.nix + ./multi/fliegen-couter.nix + ./device_tracker/openwrt.nix + ./sensor/outside.nix + ./calendar/nextcloud.nix + ./automation/firetv_restart.nix ]; services.home-assistant = { - package = (upkgs.home-assistant.overrideAttrs (old: { - doCheck = false; - checkPhase = ":"; - installCheckPhase = ":"; - })).override { - extraPackages = ps: with ps; [ - python-forecastio jsonrpc-async jsonrpc-websocket mpd2 pkgs.picotts androidtv - ]; - }; config = { influxdb = { database = "ham"; @@ -48,8 +36,6 @@ in { }; config = {}; - input_select = zigbee.input_select; # dict - timer = zigbee.timer // kurzzeitwecker.timer; # dict homeassistant = { name = "Home"; time_zone = "Europe/Berlin"; latitude = "48.7687"; @@ -60,12 +46,10 @@ in { conversation = {}; history = {}; logbook = {}; - counter = fliegen-counter.counter; logger = { default = "info"; }; - rest_command = {} - // the_playlist.rest_command; + rest_command = {}; tts = [ { platform = "google_translate"; language = "de"; @@ -81,7 +65,7 @@ in { # "platform": "broadcast", # "api_key": "", # talk to Botfather /newbot # "allowed_chat_ids": [ ID ] # curl -X GET # https://api.telegram.org/bot/getUpdates - #} + # } (builtins.fromJSON (builtins.readFile )) ]; @@ -101,7 +85,6 @@ in { ]; sun.elevation = 247; recorder = {}; - device_tracker = (import ./device_tracker/openwrt.nix); media_player = [ { platform = "FireTV Stick kodi"; host = firetv_stick; @@ -149,25 +132,12 @@ in { monitored_conditions = [ "ping" "download" "upload" ]; } # https://www.home-assistant.io/cookbook/automation_for_rainy_days/ - ] - ++ ((import ./sensor/outside.nix) {inherit lib;}) - ++ the_playlist.sensor - ++ zigbee.sensor ; + ]; frontend = { }; - calendar = [ (import ./calendar/nextcloud.nix) ]; - # light = flurlicht.light; http = { }; switch = []; - automation = [] - ++ (import ./automation/firetv_restart.nix) - ++ kurzzeitwecker.automation - #++ flurlicht.automation - ++ the_playlist.automation - ++ fliegen-counter.automation - ++ zigbee.automation; - script = - { } - // kurzzeitwecker.script; # dict + automation = []; + script = { }; }; enable = true; configDir = hassdir; -- cgit v1.2.3 From 7117223d68adac92317b6ee700c9a1c19c66b573 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 18 Nov 2020 23:57:59 +0100 Subject: ma ham/light/groups: init --- makefu/2configs/ham/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'makefu/2configs/ham/default.nix') diff --git a/makefu/2configs/ham/default.nix b/makefu/2configs/ham/default.nix index 44a36c0a..9e3f7f66 100644 --- a/makefu/2configs/ham/default.nix +++ b/makefu/2configs/ham/default.nix @@ -18,10 +18,16 @@ in { ./multi/kurzzeitwecker.nix ./multi/the_playlist.nix ./multi/fliegen-couter.nix + ./device_tracker/openwrt.nix + ./sensor/outside.nix + ./calendar/nextcloud.nix + ./automation/firetv_restart.nix + + ./light/groups.nix ]; services.home-assistant = { -- cgit v1.2.3