alpha
Login
or
Join now
hermes.pds.lassul.us
/
superconfig
forked from
lass.pds.lassul.us/superconfig
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
l hass: use as docker container
author
lassulus
date
3 years ago
(Oct 5, 2023, 11:59 AM CEST)
commit
e2987006
e2987006048e4de062ae90e93137976efd31de70
parent
e41f6899
e41f6899c5e8110bd3a40f8ab8bf31a4d8e1d923
+10
-93
1 changed file
Expand all
Collapse all
Unified
Split
nixos
2configs
hass
default.nix
+10
-93
nixos/2configs/hass/default.nix
View file
Reviewed
···
1
1
{ config, lib, pkgs, ... }:
2
2
-
with import ./lib.nix { inherit lib; };
3
3
-
let
4
4
-
dwdwfsapi = pkgs.python3Packages.buildPythonPackage rec {
5
5
-
pname = "dwdwfsapi";
6
6
-
version = "1.0.3";
7
7
-
8
8
-
src = pkgs.python3Packages.fetchPypi {
9
9
-
inherit pname version;
10
10
-
sha256 = "0fcv79xiq0qr4kivhd68iqpgrsjc7djxqs2h543pyr0sdgb5nz9x";
11
11
-
};
12
12
-
13
13
-
buildInputs = with pkgs.python3Packages; [
14
14
-
requests ciso8601
15
15
-
];
16
16
-
17
17
-
# LC_ALL = "en_US.UTF-8";
18
18
-
};
19
19
-
20
20
-
in {
2
2
+
{
21
3
imports = [
22
4
./pyscript
23
5
./zigbee.nix
···
36
18
{ predicate = "-i wiregrill -p tcp --dport 8123"; target = "ACCEPT"; } # hass
37
19
];
38
20
39
39
-
40
40
-
services.home-assistant = {
41
41
-
enable = true;
42
42
-
configWritable = true;
43
43
-
lovelaceConfigWritable = true;
44
44
-
config = let
45
45
-
tasmota = name: topic: {
46
46
-
inherit name;
47
47
-
state_topic = "stat/${topic}/POWER";
48
48
-
command_topic = "cmnd/${topic}/POWER";
49
49
-
payload_on = "ON";
50
50
-
payload_off = "OFF";
51
51
-
};
52
52
-
in {
53
53
-
homeassistant = {
54
54
-
name = "Home";
55
55
-
time_zone = "Europe/Berlin";
56
56
-
latitude = "52.46187";
57
57
-
longitude = "13.41489";
58
58
-
elevation = 90;
59
59
-
unit_system = "metric";
60
60
-
# customize = friendly_names;
61
61
-
};
62
62
-
config = {};
63
63
-
sun.elevation = 66;
64
64
-
shopping_list = {};
65
65
-
discovery = {};
66
66
-
frontend = {};
67
67
-
http = {};
68
68
-
# mqtt = {
69
69
-
# broker = "localhost";
70
70
-
# port = 1883;
71
71
-
# client_id = "home-assistant";
72
72
-
# username = "gg23";
73
73
-
# password = "gg23-mqtt";
74
74
-
# keepalive = 60;
75
75
-
# protocol = 3.1;
76
76
-
77
77
-
# discovery = true;
78
78
-
# birth_message = {
79
79
-
# topic = "/hass/status";
80
80
-
# payload = "online";
81
81
-
# };
82
82
-
# will_message = {
83
83
-
# topic = "/hass/status";
84
84
-
# payload = "offline";
85
85
-
# };
86
86
-
# };
87
87
-
sensor = [
88
88
-
{
89
89
-
platform = "dwd_weather_warnings";
90
90
-
region_name = "Berlin";
91
91
-
}
21
21
+
# TODO add auto update
22
22
+
virtualisation.oci-containers = {
23
23
+
backend = "podman";
24
24
+
containers.homeassistant = {
25
25
+
volumes = [ "home-assistant:/config" ];
26
26
+
environment.TZ = "Europe/Berlin";
27
27
+
image = "ghcr.io/home-assistant/home-assistant:stable"; # Warning: if the tag does not change, the image will not be updated
28
28
+
extraOptions = [
29
29
+
"--network=host"
92
30
];
93
93
-
mqtt.switch = [
94
94
-
(tasmota "TV" "tv")
95
95
-
(tasmota "Drucker Strom" "drucker")
96
96
-
(tasmota "Waschmaschine" "wasch")
97
97
-
(tasmota "Stereo Anlage" "stereo")
98
98
-
(tasmota "Wohnzimmer Lampe" "wohn_lampe")
99
99
-
];
100
100
-
mobile_app = {};
101
101
-
weather = [
102
102
-
{
103
103
-
platform = "openweathermap";
104
104
-
api_key = "XXX"; # TODO put into secrets
105
105
-
}
106
106
-
];
107
107
-
system_health = {};
108
108
-
history = {};
109
109
-
shopping_list = {};
110
110
-
media_player = {
111
111
-
platform = "snapcast";
112
112
-
host = "127.0.0.1";
113
113
-
};
114
31
};
115
32
};
116
33