summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/deployment/bureautomation/hass.nix
blob: b62f37bdba1ca6a1cefd4fdb57756ff8f479292a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{ pkgs, lib, ... }:
let
  firetv = "192.168.1.238";
in {
  imports = [
    <nixpkgs-unstable/nixos/modules/services/misc/home-assistant.nix>
  ];
  systemd.services.firetv = {
    wantedBy = [ "multi-user.target" ];
    serviceConfig = {
      User = "nobody";
      ExecStart = "${pkgs.python-firetv}/bin/firetv-server -d ${firetv}:5555";
    };
  };
  nixpkgs.config.packageOverrides = oldpkgs: {
    home-assistant = (import <nixpkgs-unstable> {}).home-assistant;
  };
  ids.uids.hass = 286;
  ids.gids.hass = 286;
  services.home-assistant = {
  #panel_iframe:
  #configurator:
  #  title: Configurator
  #  icon: mdi:wrench
  #  url: http://hassio.local:3218
  # sensor:
  # - platform: random
    enable = true;
    config = {
      homeassistant = {
        name = "Bureautomation";
        time_zone = "Europe/Berlin";
      };
      panel_iframe = {
        euer_blog = {
          title = "Euer Blog";
          icon =  "mdi:wrench";
          url = "https://euer.krebsco.de";
        };
      };
      media_player = [
        { platform = "kodi";
          host = firetv;
        }
        { platform = "firetv";
          # assumes python-firetv running
        }
      ];
      sensor = [
        {
          platform = "luftdaten";
          name = "Shack 1";
          sensorid = "50";
          monitored_conditions = [ "P1" "P2" ];
        }
        {
          platform = "luftdaten";
          name = "Shack 2";
          sensorid = "658";
          monitored_conditions = [ "P1" "P2" ];
        }
        {
          platform = "luftdaten";
          name = "Ditzingen";
          sensorid = "5341";
          monitored_conditions = [ "P1" "P2" ];
        }
        { platform = "random"; }
      ];
      frontend = { };
      http = { };
      feedreader.urls = [ "https://nixos.org/blogs.xml" ];
    };
  };
}