summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
Diffstat (limited to 'makefu')
-rw-r--r--makefu/1systems/gum/config.nix6
-rw-r--r--makefu/1systems/omo/config.nix2
-rw-r--r--makefu/1systems/sdev/config.nix9
-rw-r--r--makefu/2configs/bgt/download.binaergewitter.de.nix19
-rw-r--r--makefu/2configs/bureautomation/automation/bureau-shutdown.nix157
-rw-r--r--makefu/2configs/bureautomation/automation/hass-restart.nix65
-rw-r--r--makefu/2configs/bureautomation/automation/nachtlicht.nix71
-rw-r--r--makefu/2configs/bureautomation/automation/schlechteluft.nix130
-rw-r--r--makefu/2configs/bureautomation/binary_sensor/buttons.nix9
-rw-r--r--makefu/2configs/bureautomation/binary_sensor/motion.nix27
-rw-r--r--makefu/2configs/bureautomation/camera/comic.nix23
-rw-r--r--makefu/2configs/bureautomation/camera/stuttgart.nix42
-rw-r--r--makefu/2configs/bureautomation/camera/verkehrskamera.nix31
-rw-r--r--makefu/2configs/bureautomation/default.nix116
-rw-r--r--makefu/2configs/bureautomation/deps/dwd_pollen.nix32
-rw-r--r--makefu/2configs/bureautomation/device_tracker/openwrt.nix29
-rw-r--r--makefu/2configs/bureautomation/kalauerbot.nix3
-rw-r--r--makefu/2configs/bureautomation/light/buzzer.nix12
-rw-r--r--makefu/2configs/bureautomation/light/statuslight.nix14
-rw-r--r--makefu/2configs/bureautomation/multi/10h_timers.nix16
-rw-r--r--makefu/2configs/bureautomation/multi/README.md3
-rw-r--r--makefu/2configs/bureautomation/multi/aramark.nix21
-rw-r--r--makefu/2configs/bureautomation/multi/daily-standup.nix83
-rw-r--r--makefu/2configs/bureautomation/multi/frosch.nix158
-rw-r--r--makefu/2configs/bureautomation/multi/matrix.nix106
-rw-r--r--makefu/2configs/bureautomation/multi/mittagessen.nix93
-rw-r--r--makefu/2configs/bureautomation/person/team.nix153
-rw-r--r--makefu/2configs/bureautomation/script/multi_blink.nix73
-rw-r--r--makefu/2configs/bureautomation/sensor/airquality.nix21
-rw-r--r--makefu/2configs/bureautomation/sensor/espeasy.nix12
-rw-r--r--makefu/2configs/bureautomation/sensor/influxdb.nix18
-rw-r--r--makefu/2configs/bureautomation/sensor/outside.nix54
-rw-r--r--makefu/2configs/bureautomation/sensor/tasmota_firmware.nix5
-rw-r--r--makefu/2configs/bureautomation/switch/rfbridge.nix16
-rw-r--r--makefu/2configs/bureautomation/switch/tasmota_switch.nix17
-rw-r--r--makefu/2configs/default.nix3
-rw-r--r--makefu/2configs/deployment/owncloud.nix28
-rw-r--r--makefu/2configs/editor/vim.nix4
-rw-r--r--makefu/2configs/gui/base.nix6
-rw-r--r--makefu/2configs/ham/automation/firetv_restart.nix52
-rw-r--r--makefu/2configs/ham/calendar/nextcloud.nix11
-rw-r--r--makefu/2configs/ham/default.nix72
-rw-r--r--makefu/2configs/ham/device_tracker/openwrt.nix23
-rw-r--r--makefu/2configs/ham/light/groups.nix41
-rw-r--r--makefu/2configs/ham/multi/fliegen-couter.nix100
-rw-r--r--makefu/2configs/ham/multi/kurzzeitwecker.nix223
-rw-r--r--makefu/2configs/ham/multi/the_playlist.nix139
-rw-r--r--makefu/2configs/ham/multi/zigbee2mqtt.nix127
-rw-r--r--makefu/2configs/ham/sensor/outside.nix45
-rw-r--r--makefu/2configs/ham/zigbee2mqtt/default.nix31
-rw-r--r--makefu/2configs/ham/zigbee2mqtt/hass.nix130
-rw-r--r--makefu/2configs/ham/zigbee2mqtt/osram.nix14
-rw-r--r--makefu/2configs/hw/droidcam.nix7
-rw-r--r--makefu/2configs/hw/tp-x2x0.nix25
-rw-r--r--makefu/2configs/minimal.nix1
-rw-r--r--makefu/2configs/printer.nix16
-rw-r--r--makefu/2configs/remote-build/gum.nix8
-rw-r--r--makefu/2configs/share/omo.nix3
-rw-r--r--makefu/2configs/sickbeard/sickgear.nix6
-rw-r--r--makefu/2configs/urlwatch/default.nix3
-rw-r--r--makefu/2configs/wireguard/server.nix2
-rw-r--r--makefu/3modules/snapraid.nix2
-rw-r--r--makefu/5pkgs/droidcam/default.nix55
-rw-r--r--makefu/5pkgs/hactool/default.nix30
-rw-r--r--makefu/5pkgs/kalauerbot/badsync.patch14
-rw-r--r--makefu/5pkgs/kalauerbot/default.nix7
-rw-r--r--makefu/5pkgs/navi/default.nix37
-rw-r--r--makefu/5pkgs/v4l2loopback-dc/default.nix36
-rw-r--r--makefu/krops.nix2
69 files changed, 1546 insertions, 1403 deletions
diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix
index d0ba1a3c6..f65c6672b 100644
--- a/makefu/1systems/gum/config.nix
+++ b/makefu/1systems/gum/config.nix
@@ -82,8 +82,12 @@ in {
# ci
# <stockholm/makefu/2configs/exim-retiolum.nix>
<stockholm/makefu/2configs/git/cgit-retiolum.nix>
+
+ ###### Shack #####
# <stockholm/makefu/2configs/shack/events-publisher>
- <stockholm/makefu/2configs/shack/gitlab-runner>
+ # <stockholm/makefu/2configs/shack/gitlab-runner>
+
+
<stockholm/makefu/2configs/remote-build/slave.nix>
<stockholm/makefu/2configs/remote-build/aarch64-community.nix>
<stockholm/makefu/2configs/taskd.nix>
diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix
index dd89b4057..a9e307ddf 100644
--- a/makefu/1systems/omo/config.nix
+++ b/makefu/1systems/omo/config.nix
@@ -47,6 +47,7 @@ in {
# <stockholm/makefu/2configs/legacy_only.nix>
<stockholm/makefu/2configs/share/omo.nix>
+ <stockholm/makefu/2configs/share/gum-client.nix>
<stockholm/makefu/2configs/dcpp/airdcpp.nix>
{ krebs.airdcpp.dcpp.shares = let
d = path: "/media/cryptX/${path}";
@@ -91,7 +92,6 @@ in {
<stockholm/makefu/2configs/bluetooth-mpd.nix>
<stockholm/makefu/2configs/ham>
- <stockholm/makefu/2configs/ham/zigbee2mqtt>
{
makefu.ps3netsrv = {
enable = true;
diff --git a/makefu/1systems/sdev/config.nix b/makefu/1systems/sdev/config.nix
index e3c59e181..d02c30342 100644
--- a/makefu/1systems/sdev/config.nix
+++ b/makefu/1systems/sdev/config.nix
@@ -37,10 +37,11 @@
passwdqc-utils
gnupg
populate
- (pkgs.writeScriptBin "tor-browser" ''
- #! /bin/sh
- TOR_SKIP_LAUNCH=1 ${torbrowser}/bin/tor-browser
- '')
+ # 20.09: torbrowser is broken
+ #(pkgs.writeScriptBin "tor-browser" ''
+ # #! /bin/sh
+ # TOR_SKIP_LAUNCH=1 ${torbrowser}/bin/tor-browser
+ #'')
];
networking.firewall.allowedTCPPorts = [
diff --git a/makefu/2configs/bgt/download.binaergewitter.de.nix b/makefu/2configs/bgt/download.binaergewitter.de.nix
index 77c9ddc81..4abc7d345 100644
--- a/makefu/2configs/bgt/download.binaergewitter.de.nix
+++ b/makefu/2configs/bgt/download.binaergewitter.de.nix
@@ -17,12 +17,14 @@ in {
PasswordAuthentication no
'';
};
+
users.users.auphonic = {
uid = genid "auphonic";
group = "nginx";
useDefaultShell = true;
openssh.authorizedKeys.keys = [ ident config.krebs.users.makefu.pubkey ];
};
+
services.logrotate = {
enable = true;
config = ''
@@ -36,6 +38,12 @@ in {
}
'';
};
+
+ # 20.09 unharden nginx to write logs
+ systemd.services.nginx.serviceConfig.ReadWritePaths = [
+ "/var/spool/nginx/logs/"
+ ];
+
services.nginx = {
appendHttpConfig = ''
types {
@@ -55,15 +63,4 @@ in {
'';
};
};
- environment.etc."netdata/python.d/web_log.conf".text = ''
- nginx_log3:
- name: 'nginx'
- path: '/var/spool/nginx/logs/access.log'
- nginx_log4:
- name: 'bgt'
- path: '${bgtaccess}'
- '';
-
- users.users.netdata.extraGroups = [ "nginx" ];
-
}
diff --git a/makefu/2configs/bureautomation/automation/bureau-shutdown.nix b/makefu/2configs/bureautomation/automation/bureau-shutdown.nix
index b9aa710c3..f4c10adc8 100644
--- a/makefu/2configs/bureautomation/automation/bureau-shutdown.nix
+++ b/makefu/2configs/bureautomation/automation/bureau-shutdown.nix
@@ -1,84 +1,87 @@
-[
- { alias = "Turn on Fernseher on group home";
- trigger = {
- platform = "state";
- entity_id = "group.team";
- from = "not_home";
- to = "home";
- for.seconds = 30;
- };
- action = [
- {
- service = "homeassistant.turn_on";
- entity_id = [
- "switch.fernseher"
- "switch.feuer"
- ];
- }
- {
- service = "media_player.kodi_call_method";
- data = {
- entity_id = "media_player.kodi";
- method = "Player.Open";
- item.partymode = "music";
- };
- }
- {
- service = "notify.telegrambot";
- data = {
- title = "Bureau Startup";
- message = "Das Büro wurde eröffnet";
- };
- }
- ];
- }
- { alias = "Turn off Fernseher after last in group left";
- trigger = [
- { # trigger when movement was detected at the time
+{
+ services.home-assistant.config.automation =
+ [
+ { alias = "Turn on Fernseher on group home";
+ trigger = {
platform = "state";
entity_id = "group.team";
- from = "home";
- to = "not_home";
- }
- { # trigger at 18:00 no matter what
- # to avoid 'everybody left before 18:00:00'
- platform = "time";
- at = "18:00:00";
- }
- ];
- action = [
- {
- service = "homeassistant.turn_off";
- entity_id = [
- "switch.fernseher"
- "switch.feuer"
- "light.status_felix"
- "light.status_daniel"
- ];
- }
- {
- service = "notify.telegrambot";
- data_template = {
- title = "Bureau Shutdown";
- message = "All devices are turned off due to {{ trigger.platform }}";
- };
- }
- ];
- condition =
- { condition = "and";
- conditions = [
+ from = "not_home";
+ to = "home";
+ for.seconds = 30;
+ };
+ action = [
+ {
+ service = "homeassistant.turn_on";
+ entity_id = [
+ "switch.fernseher"
+ "switch.feuer"
+ ];
+ }
{
- condition = "time";
- before = "06:30:00"; #only turn off between 6:30 and 18:00
- after = "18:00:00";
- # weekday = [ "mon" "tue" "wed" "thu" "fri" ];
+ service = "media_player.kodi_call_method";
+ data = {
+ entity_id = "media_player.kodi";
+ method = "Player.Open";
+ item.partymode = "music";
+ };
}
- { # if anybody is still there
- condition = "state";
+ {
+ service = "notify.telegrambot";
+ data = {
+ title = "Bureau Startup";
+ message = "Das Büro wurde eröffnet";
+ };
+ }
+ ];
+ }
+ { alias = "Turn off Fernseher after last in group left";
+ trigger = [
+ { # trigger when movement was detected at the time
+ platform = "state";
entity_id = "group.team";
- state = "not_home";
+ from = "home";
+ to = "not_home";
+ }
+ { # trigger at 18:00 no matter what
+ # to avoid 'everybody left before 18:00:00'
+ platform = "time";
+ at = "18:00:00";
}
];
- };
- }
-]
+ action = [
+ {
+ service = "homeassistant.turn_off";
+ entity_id = [
+ "switch.fernseher"
+ "switch.feuer"
+ "light.status_felix"
+ "light.status_daniel"
+ ];
+ }
+ {
+ service = "notify.telegrambot";
+ data_template = {
+ title = "Bureau Shutdown";
+ message = "All devices are turned off due to {{ trigger.platform }}";
+ };
+ }
+ ];
+ condition =
+ { condition = "and";
+ conditions = [
+ {
+ condition = "time";
+ before = "06:30:00"; #only turn off between 6:30 and 18:00
+ after = "18:00:00";
+ # weekday = [ "mon" "tue" "wed" "thu" "fri" ];
+ }
+ { # if anybody is still there
+ condition = "state";
+ entity_id = "group.team";
+ state = "not_home";
+ }
+ ];
+ };
+ }
+ ];
+}
diff --git a/makefu/2configs/bureautomation/automation/hass-restart.nix b/makefu/2configs/bureautomation/automation/hass-restart.nix
index be16f6966..3b3ce0599 100644
--- a/makefu/2configs/bureautomation/automation/hass-restart.nix
+++ b/makefu/2configs/bureautomation/automation/hass-restart.nix
@@ -1,31 +1,34 @@
-[
- { alias = "State on HA start-up";
- trigger = {
- platform = "homeassistant";
- event = "start";
- };
- action = [
- # Startup State
- { service = "mqtt.publish";
- data = {
- topic = "/bam/sonoffs/cmnd/state";
- payload = "";
- };
- }
- # Firmware Version
- { service = "mqtt.publish";
- data = {
- topic = "/bam/sonoffs/cmnd/status";
- payload = "2";
- };
- }
- # Will trigger restart of all devices!
- #{ service = "mqtt.publish";
- # data = {
- # topic = "sonoffs/cmnd/SetOption59"; # configure sending state on power change
- # payload = "1";
- # };
- #}
- ];
- }
-]
+{
+ services.home-assistant.config.automation =
+ [
+ { alias = "State on HA start-up";
+ trigger = {
+ platform = "homeassistant";
+ event = "start";
+ };
+ action = [
+ # Startup State
+ { service = "mqtt.publish";
+ data = {
+ topic = "/bam/sonoffs/cmnd/state";
+ payload = "";
+ };
+ }
+ # Firmware Version
+ { service = "mqtt.publish";
+ data = {
+ topic = "/bam/sonoffs/cmnd/status";
+ payload = "2";
+ };
+ }
+ # Will trigger restart of all devices!
+ #{ service = "mqtt.publish";
+ # data = {
+ # topic = "sonoffs/cmnd/SetOption59"; # configure sending state on power change
+ # payload = "1";
+ # };
+ #}
+ ];
+ }
+ ];
+}
diff --git a/makefu/2configs/bureautomation/automation/nachtlicht.nix b/makefu/2configs/bureautomation/automation/nachtlicht.nix
index ec6fa20c7..ade89418d 100644
--- a/makefu/2configs/bureautomation/automation/nachtlicht.nix
+++ b/makefu/2configs/bureautomation/automation/nachtlicht.nix
@@ -1,35 +1,38 @@
-[
- # TODO: trigger if it is before dusk and somebody arives but nachtlichter are
- # off from last day
- # TODO: do not have nachtlicht turned on at night
- {
- alias = "Turn on Nachtlicht at dusk"; # when it gets dim
- trigger =
- { platform = "numeric_state";
- entity_id = "sun.sun";
- value_template = "{{ state.attributes.elevation }}";
- below = 10;
+{
+ services.home-assistant.config.automation =
+ [
+ # TODO: trigger if it is before dusk and somebody arives but nachtlichter are
+ # off from last day
+ # TODO: do not have nachtlicht turned on at night
+ {
+ alias = "Turn on Nachtlicht at dusk"; # when it gets dim
+ trigger =
+ { platform = "numeric_state";
+ entity_id = "sun.sun";
+ value_template = "{{ state.attributes.elevation }}";
+ below = 10;
- };
- action =
- { service = "homeassistant.turn_on";
- entity_id = [ "group.nachtlicht" ];
- };
- }
- {
- alias = "Turn off Nachtlicht at dawn";
- trigger =
- { platform = "sun";
- event = "sunrise";
- offset = "01:30:00"; # on dawn
- };
- # TODO: when somebody is still in the buero
- # condition =
- #{
- #};
- action =
- { service = "homeassistant.turn_off";
- entity_id = [ "group.nachtlicht" ];
- };
- }
-]
+ };
+ action =
+ { service = "homeassistant.turn_on";
+ entity_id = [ "group.nachtlicht" ];
+ };
+ }
+ {
+ alias = "Turn off Nachtlicht at dawn";
+ trigger =
+ { platform = "sun";
+ event = "sunrise";
+ offset = "01:30:00"; # on dawn
+ };
+ # TODO: when somebody is still in the buero
+ # condition =
+ #{
+ #};
+ action =
+ { service = "homeassistant.turn_off";
+ entity_id = [ "group.nachtlicht" ];
+ };
+ }
+ ];
+}
diff --git a/makefu/2configs/bureautomation/automation/schlechteluft.nix b/makefu/2configs/bureautomation/automation/schlechteluft.nix
index 370334743..ea1d44515 100644
--- a/makefu/2configs/bureautomation/automation/schlechteluft.nix
+++ b/makefu/2configs/bureautomation/automation/schlechteluft.nix
@@ -1,71 +1,75 @@
let
long_threshold = 30;
-in [
- {
- alias = "Bad Air Alarm 60 seconds";
- trigger =
- { platform = "numeric_state";
- entity_id = "sensor.air_quality";
- above = 1523;
- for.seconds = 60;
- };
- condition = {
- condition = "and";
- conditions = [
- { condition = "state";
- entity_id = "group.team";
- state = "home";
- }
- { condition = "time";
- after = "06:00:00";
- before = "20:00:00";
+in
+{
+ services.home-assistant.config.automation =
+ [
+ {
+ alias = "Bad Air Alarm 60 seconds";
+ trigger =
+ { platform = "numeric_state";
+ entity_id = "sensor.air_quality";
+ above = 1523;
+ for.seconds = 60;
+ };
+ condition = {
+ condition = "and";
+ conditions = [
+ { condition = "state";
+ entity_id = "group.team";
+ state = "home";
+ }
+ { condition = "time";
+ after = "06:00:00";
+ before = "20:00:00";
+ }
+ ];
+ };
+
+ action = [
+ { service = "homeassistant.turn_on";
+ entity_id = [
+ "script.schlechteluft"
+ ];
}
];
- };
-
- action = [
- { service = "homeassistant.turn_on";
- entity_id = [
- "script.schlechteluft"
+ }
+ {
+ alias = "Bad Air Alarm ${toString long_threshold} Minutes";
+ trigger =
+ { platform = "numeric_state";
+ entity_id = "sensor.air_quality";
+ above = 1523;
+ for.minutes = long_threshold;
+ };
+ condition = {
+ condition = "and";
+ conditions = [
+ { condition = "state";
+ entity_id = "group.team";
+ state = "home";
+ }
+ { condition = "time";
+ after = "06:00:00";
+ before = "20:00:00";
+ }
];
- }
- ];
- }
- {
- alias = "Bad Air Alarm ${toString long_threshold} Minutes";
- trigger =
- { platform = "numeric_state";
- entity_id = "sensor.air_quality";
- above = 1523;
- for.minutes = long_threshold;
- };
- condition = {
- condition = "and";
- conditions = [
- { condition = "state";
- entity_id = "group.team";
-