summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-08-13 18:55:08 +0200
committerlassulus <lassulus@lassul.us>2019-08-13 18:55:08 +0200
commit3047fea88d2379011685be4e57a5b379778423c7 (patch)
tree23ad61badb3794cabf4a9cc9de89c3465cfec737 /makefu
parent0699b41b05a1f9cd133c15c3aadf70c3a45170f6 (diff)
parent124b1d7639c404e5a58a9aef0f0bee1424f54a45 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu')
-rw-r--r--makefu/0tests/data/secrets/hass/citadel-bot.json1
-rw-r--r--makefu/0tests/data/secrets/hass/voicerss.apikey0
-rw-r--r--makefu/1systems/cake/config.nix7
-rw-r--r--makefu/1systems/filepimp/config.nix1
-rw-r--r--makefu/1systems/firecracker/config.nix25
-rw-r--r--makefu/1systems/firecracker/hardware-config.nix30
-rw-r--r--makefu/1systems/firecracker/source.nix4
-rw-r--r--makefu/1systems/gum/config.nix29
-rw-r--r--makefu/1systems/gum/hardware-config.nix4
-rw-r--r--makefu/1systems/sdcard/config.nix40
-rw-r--r--makefu/1systems/sdcard/kernel.nix15
-rw-r--r--makefu/1systems/sdcard/source.nix3
-rw-r--r--makefu/1systems/wbob/config.nix21
-rw-r--r--makefu/2configs/Reaktor/bgt.nix15
-rw-r--r--makefu/2configs/bureautomation/automation/10h_timer.nix154
-rw-r--r--makefu/2configs/bureautomation/automation/bureau-shutdown.nix10
-rw-r--r--makefu/2configs/bureautomation/automation/schlechteluft.nix74
-rw-r--r--makefu/2configs/bureautomation/combination/10h_timers.nix194
-rw-r--r--makefu/2configs/bureautomation/combination/README.md3
-rw-r--r--makefu/2configs/bureautomation/combination/matrix.nix65
-rw-r--r--makefu/2configs/bureautomation/combination/mittagessen.nix89
-rw-r--r--makefu/2configs/bureautomation/default.nix280
-rw-r--r--makefu/2configs/bureautomation/deps/dwd_pollen.nix32
-rw-r--r--makefu/2configs/bureautomation/deps/gtts-token.nix27
-rw-r--r--makefu/2configs/bureautomation/deps/pyhaversion.nix33
-rw-r--r--makefu/2configs/bureautomation/device_tracker/openwrt.nix3
-rw-r--r--makefu/2configs/bureautomation/hass.nix198
-rw-r--r--makefu/2configs/bureautomation/script/multi_blink.nix8
-rw-r--r--makefu/2configs/bureautomation/sensor/airquality.nix9
-rw-r--r--makefu/2configs/bureautomation/sensor/pollen.nix7
-rw-r--r--makefu/2configs/mail/mail.euer.nix6
-rw-r--r--makefu/2configs/tools/extra-gui.nix2
-rw-r--r--makefu/2configs/wireguard/wiregrill.nix46
33 files changed, 1014 insertions, 421 deletions
diff --git a/makefu/0tests/data/secrets/hass/citadel-bot.json b/makefu/0tests/data/secrets/hass/citadel-bot.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/makefu/0tests/data/secrets/hass/citadel-bot.json
@@ -0,0 +1 @@
+{}
diff --git a/makefu/0tests/data/secrets/hass/voicerss.apikey b/makefu/0tests/data/secrets/hass/voicerss.apikey
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/makefu/0tests/data/secrets/hass/voicerss.apikey
diff --git a/makefu/1systems/cake/config.nix b/makefu/1systems/cake/config.nix
index 8617578f0..eaaac8f41 100644
--- a/makefu/1systems/cake/config.nix
+++ b/makefu/1systems/cake/config.nix
@@ -5,14 +5,14 @@ in {
imports = [
<stockholm/makefu>
./hardware-config.nix
+ { environment.systemPackages = with pkgs;[ rsync screen curl git tmux picocom mosh ];}
# <stockholm/makefu/2configs/tools/core.nix>
- { environment.systemPackages = with pkgs;[ rsync screen curl git ];}
<stockholm/makefu/2configs/binary-cache/nixos.nix>
#<stockholm/makefu/2configs/support-nixos.nix>
<stockholm/makefu/2configs/homeautomation/default.nix>
<stockholm/makefu/2configs/homeautomation/google-muell.nix>
-# configure your hw:
-# <stockholm/makefu/2configs/save-diskspace.nix>
+ # configure your hw:
+ # <stockholm/makefu/2configs/save-diskspace.nix>
];
krebs = {
enable = true;
@@ -24,5 +24,4 @@ in {
documentation.man.enable = false;
services.nixosManual.enable = false;
sound.enable = false;
-
}
diff --git a/makefu/1systems/filepimp/config.nix b/makefu/1systems/filepimp/config.nix
index 30ba61a9b..e023c2885 100644
--- a/makefu/1systems/filepimp/config.nix
+++ b/makefu/1systems/filepimp/config.nix
@@ -48,7 +48,6 @@ in {
hardware.cpu.amd.updateMicrocode = true;
zramSwap.enable = true;
- zramSwap.numDevices = 2;
makefu.snapraid = let
toMedia = name: "/media/" + name;
diff --git a/makefu/1systems/firecracker/config.nix b/makefu/1systems/firecracker/config.nix
new file mode 100644
index 000000000..87f500287
--- /dev/null
+++ b/makefu/1systems/firecracker/config.nix
@@ -0,0 +1,25 @@
+{ config, lib, pkgs, ... }:
+let
+ primaryInterface = "eth0";
+in {
+ imports = [
+ <stockholm/makefu>
+ ./hardware-config.nix
+ # <stockholm/makefu/2configs/tools/core.nix>
+ { environment.systemPackages = with pkgs;[ rsync screen curl git ];}
+ <stockholm/makefu/2configs/binary-cache/nixos.nix>
+ #<stockholm/makefu/2configs/support-nixos.nix>
+# configure your hw:
+# <stockholm/makefu/2configs/save-diskspace.nix>
+ ];
+ krebs = {
+ enable = true;
+ tinc.retiolum.enable = true;
+ build.host = config.krebs.hosts.firecracker;
+ };
+ networking.firewall.trustedInterfaces = [ primaryInterface ];
+ documentation.info.enable = false;
+ documentation.man.enable = false;
+ services.nixosManual.enable = false;
+ sound.enable = false;
+}
diff --git a/makefu/1systems/firecracker/hardware-config.nix b/makefu/1systems/firecracker/hardware-config.nix
new file mode 100644
index 000000000..b821a3375
--- /dev/null
+++ b/makefu/1systems/firecracker/hardware-config.nix
@@ -0,0 +1,30 @@
+{ pkgs, lib, ... }:
+{
+ boot.kernelParams = lib.mkForce ["console=ttyS2,1500000n8" "earlycon=uart8250,mmio32,0xff1a0000" "earlyprintk"];
+ boot.loader.grub.enable = false;
+ boot.loader.generic-extlinux-compatible.enable = true;
+ boot.loader.generic-extlinux-compatible.configurationLimit = 1;
+ boot.loader.generationsDir.enable = lib.mkDefault false;
+ boot.supportedFilesystems = lib.mkForce [ "vfat" ];
+
+ boot.tmpOnTmpfs = lib.mkForce false;
+ boot.cleanTmpDir = true;
+ hardware.enableRedistributableFirmware = true;
+
+ ## wifi not working, will be fixed with https://github.com/NixOS/nixpkgs/pull/53747
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+ networking.wireless.enable = true;
+ # File systems configuration for using the installer's partition layout
+ swapDevices = [ { device = "/var/swap"; size = 4096; } ];
+ fileSystems = {
+ "/boot" = {
+ device = "/dev/disk/by-label/NIXOS_BOOT";
+ fsType = "vfat";
+ };
+ "/" = {
+ device = "/dev/disk/by-label/NIXOS_SD";
+ fsType = "ext4";
+ };
+ };
+
+}
diff --git a/makefu/1systems/firecracker/source.nix b/makefu/1systems/firecracker/source.nix
new file mode 100644
index 000000000..22c40039e
--- /dev/null
+++ b/makefu/1systems/firecracker/source.nix
@@ -0,0 +1,4 @@
+{
+ name="cake";
+ full = true;
+}
diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix
index 7bc06f833..9585d8599 100644
--- a/makefu/1systems/gum/config.nix
+++ b/makefu/1systems/gum/config.nix
@@ -97,6 +97,24 @@ in {
# sharing
<stockholm/makefu/2configs/share/gum.nix>
<stockholm/makefu/2configs/torrent.nix>
+ { services.sickbeard = {
+ enable = true;
+ package = pkgs.sickgear;
+ user = "sickbeard";
+ group = "download";
+ port = 8280;
+ };
+ services.nginx.virtualHosts."sick.makefu.r" = {
+ locations."/".proxyPass = http://localhost:8280;
+ extraConfig = ''
+ if ( $server_addr = "${external-ip}" ) {
+ return 403;
+ }
+ '';
+ };
+ users.users.sickbeard.extraGroups = [ "nginx" ];
+ }
+ { nixpkgs.config.allowUnfree = true; }
#<stockholm/makefu/2configs/retroshare.nix>
## <stockholm/makefu/2configs/ipfs.nix>
#<stockholm/makefu/2configs/syncthing.nix>
@@ -111,6 +129,7 @@ in {
<stockholm/makefu/2configs/iodined.nix>
<stockholm/makefu/2configs/bitlbee.nix>
<stockholm/makefu/2configs/wireguard/server.nix>
+ <stockholm/makefu/2configs/wireguard/wiregrill.nix>
# Removed until move: no extra mails
<stockholm/makefu/2configs/urlwatch>
@@ -153,11 +172,17 @@ in {
makefu.dl-dir = "/var/download";
- services.openssh.hostKeys = [
+ services.openssh.hostKeys = lib.mkForce [
{ bits = 4096; path = (toString <secrets/ssh_host_rsa_key>); type = "rsa"; }
{ path = (toString <secrets/ssh_host_ed25519_key>); type = "ed25519"; } ];
###### stable
- services.nginx.virtualHosts.cgit.serverAliases = [ "cgit.euer.krebsco.de" ];
+
+ services.nginx.virtualHosts."cgit.euer.krebsco.de" = {
+ forceSSL = true;
+ enableACME = true;
+ locations."/".proxyPass = "http://cgit.gum.r";
+ };
+
krebs.build.host = config.krebs.hosts.gum;
# Network
diff --git a/makefu/1systems/gum/hardware-config.nix b/makefu/1systems/gum/hardware-config.nix
index 857fad7aa..e49b621e7 100644
--- a/makefu/1systems/gum/hardware-config.nix
+++ b/makefu/1systems/gum/hardware-config.nix
@@ -41,7 +41,7 @@ in {
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.devices = [ main-disk ];
- boot.initrd.kernelModules = [ "dm-raid" "dm_cache" ];
+ boot.initrd.kernelModules = [ "dm-raid" "dm_cache" "dm-thin-pool" ];
boot.initrd.availableKernelModules = [
"ata_piix" "vmw_pvscsi" "virtio_pci" "sd_mod" "ahci"
"xhci_pci" "ehci_pci" "ahci" "sd_mod"
@@ -67,7 +67,7 @@ in {
fileSystems."/var/www/binaergewitter" = {
device = "/dev/nixos/binaergewitter";
fsType = "ext4";
- options = [ "nofail" "x-systemd.automount" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ];
+ options = [ "nofail" ];
};
fileSystems."/var/lib/borgbackup" = {
device = "/dev/nixos/backup";
diff --git a/makefu/1systems/sdcard/config.nix b/makefu/1systems/sdcard/config.nix
new file mode 100644
index 000000000..4e3c22a30
--- /dev/null
+++ b/makefu/1systems/sdcard/config.nix
@@ -0,0 +1,40 @@
+{ config, pkgs, lib, ... }:
+let
+ kernel = pkgs.callPackage ./kernel.nix {
+ kernelPatches = with pkgs.kernelPatches; [
+ # kernelPatches.bridge_stp_helper
+ # kernelPatches.modinst_arg_list_too_long
+ ];
+ };
+in
+{
+ imports = [
+ <nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix>
+ # <stockholm/makefu/2configs/minimal.nix>
+ ];
+ # TODO: NIX_PATH and nix.nixPath are being set by default.nix right now
+ # cd ~/stockholm ; nix build config.system.build.sdImage -I nixos-config=makefu/1systems/sdcard/config.nix -f /home/makefu/nixpkgs/nixos
+
+ boot.kernelParams = ["console=ttyS2,1500000" "earlycon=uart8250,mmio32,0xff1a0000"];
+ # boot.kernelPackages = pkgs.linuxPackages_latest;
+ boot.kernelPackages = pkgs.linuxPackagesFor kernel;
+ boot.supportedFilesystems = lib.mkForce [ "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
+
+ # krebs.hidden-ssh.enable = true;
+ environment.systemPackages = with pkgs; [
+ aria2
+ ddrescue
+ ];
+ environment.extraInit = ''
+ EDITOR=vim
+ '';
+ # iso-specific
+ services.openssh = {
+ enable = true;
+ hostKeys = [
+ { bits = 8192; type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; }
+ ];
+ };
+ # enable ssh in the iso boot process
+ systemd.services.sshd.wantedBy = lib.mkForce [ "multi-user.target" ];
+}
diff --git a/makefu/1systems/sdcard/kernel.nix b/makefu/1systems/sdcard/kernel.nix
new file mode 100644
index 000000000..df5e7ada9
--- /dev/null
+++ b/makefu/1systems/sdcard/kernel.nix
@@ -0,0 +1,15 @@
+{ fetchFromGitLab, buildLinux, ... } @ args:
+buildLinux (args // rec {
+ version = "4.4.55";
+ modDirVersion = "4.4.55";
+ extraMeta.branch = "4.4";
+ defconfig = "firefly_linux_defconfig";
+
+ src = fetchFromGitLab {
+ owner = "TeeFirefly";
+ repo = "linux-kernel";
+ rev = "firefly_0821_release";
+ sha256 = "1fwj9cm5ysz286znrr3fyrhfn903m84i7py4rv3y3h9avxb3zl1r";
+ };
+ extraMeta.platforms = [ "aarch64-linux" ];
+} // (args.argsOverride or {}))
diff --git a/makefu/1systems/sdcard/source.nix b/makefu/1systems/sdcard/source.nix
new file mode 100644
index 000000000..6bef8ada9
--- /dev/null
+++ b/makefu/1systems/sdcard/source.nix
@@ -0,0 +1,3 @@
+{
+ name="iso";
+}
diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix
index ab77f16dd..ad7fc825c 100644
--- a/makefu/1systems/wbob/config.nix
+++ b/makefu/1systems/wbob/config.nix
@@ -16,15 +16,16 @@ in {
<stockholm/makefu/2configs/tools/core-gui.nix>
<stockholm/makefu/2configs/tools/extra-gui.nix>
<stockholm/makefu/2configs/tools/media.nix>
- <stockholm/makefu/2configs/virtualisation/libvirt.nix>
+ # <stockholm/makefu/2configs/virtualisation/libvirt.nix>
+ # <stockholm/makefu/2configs/virtualisation/virtualbox.nix>
<stockholm/makefu/2configs/tinc/retiolum.nix>
- <stockholm/makefu/2configs/mqtt.nix>
<stockholm/makefu/2configs/gui/wbob-kiosk.nix>
# <stockholm/makefu/2configs/gui/studio-virtual.nix>
# <stockholm/makefu/2configs/audio/jack-on-pulse.nix>
# <stockholm/makefu/2configs/audio/realtime-audio.nix>
# <stockholm/makefu/2configs/vncserver.nix>
+ <stockholm/makefu/2configs/logging/server.nix>
# Services
# <stockholm/makefu/2configs/hydra/stockholm.nix>
@@ -33,7 +34,7 @@ in {
<stockholm/makefu/2configs/bluetooth-mpd.nix>
# Sensors
- <stockholm/makefu/2configs/stats/client.nix>
+ # <stockholm/makefu/2configs/stats/client.nix>
<stockholm/makefu/2configs/stats/collectd-client.nix>
<stockholm/makefu/2configs/stats/telegraf>
<stockholm/makefu/2configs/stats/telegraf/airsensor.nix>
@@ -44,16 +45,10 @@ in {
# <stockholm/makefu/2configs/stats/telegraf/bamstats.nix>
{ environment.systemPackages = [ pkgs.vlc ]; }
- {
- # Risikoübernahme
- nixpkgs.config.permittedInsecurePackages = [
- "homeassistant-0.77.2"
- ];
- }
- <stockholm/makefu/2configs/bureautomation>
+ <stockholm/makefu/2configs/bureautomation> # new hass entry point
<stockholm/makefu/2configs/bureautomation/led-fader.nix>
- <stockholm/makefu/2configs/bureautomation/mpd.nix>
- <stockholm/makefu/2configs/bureautomation/hass.nix>
+ # <stockholm/makefu/2configs/bureautomation/mpd.nix> #mpd is only used for TTS
+ <stockholm/makefu/2configs/mqtt.nix>
(let
collectd-port = 25826;
influx-port = 8086;
@@ -85,6 +80,7 @@ in {
'';
})
+ <stockholm/makefu/2configs/backup/state.nix>
# temporary
# <stockholm/makefu/2configs/temp/rst-issue.nix>
];
@@ -106,6 +102,7 @@ in {
LoadPlugin curl
<Plugin curl>
+ Interval 300
TotalTime true
NamelookupTime true
ConnectTime true
diff --git a/makefu/2configs/Reaktor/bgt.nix b/makefu/2configs/Reaktor/bgt.nix
new file mode 100644
index 000000000..42325bcd6
--- /dev/null
+++ b/makefu/2configs/Reaktor/bgt.nix
@@ -0,0 +1,15 @@
+{ pkgs, ... }:
+{
+ krebs.Reaktor.reaktor-bgt = {
+ nickname = "Reaktor|bgt";
+ workdir = "/var/lib/Reaktor/bgt";
+ channels = [ "#binaergewitter" ];
+ plugins = with pkgs.ReaktorPlugins;
+ [ titlebot
+ # stockholm-issue
+ nixos-version
+ # shack-correct
+ # sed-plugin
+ random-emoji ];
+ };
+}
diff --git a/makefu/2configs/bureautomation/automation/10h_timer.nix b/makefu/2configs/bureautomation/automation/10h_timer.nix
deleted file mode 100644
index dd747114e..000000000
--- a/makefu/2configs/bureautomation/automation/10h_timer.nix
+++ /dev/null
@@ -1,154 +0,0 @@
-[
- { alias = "start Felix 10h";
- trigger = {
- platform = "state";
- entity_id = [ "device_tracker.felix_phone" "device_tracker.felix_laptop" ];
- from = "not_home";
- to = "home";
- };
- condition = {
- condition = "and";
- conditions = [
- {
- condition = "state";
- entity_id = "timer.felix_10h";
- state = "idle";
- }
- {
- condition = "time";
- after = "06:00:00";
- before = "12:00:00";
- }
- ];
- };
- action = [
- { service = "timer.start";
- entity_id = [ "timer.felix_10h" "timer.felix_8_30h" "timer.felix_7h" ] ;
- }
- { service = "homeassistant.turn_on";
- entity_id = [
- "script.buzz_red_led_fast"
- "script.blitz_10s"
- ];
- }
- { service = "light.turn_on";
- data = {
- effect = "2";
- entity_id = [ "light.status_felix" ];
- };
- }
- ];
- }
-
- { alias = "Disable Felix timer at button press";
- trigger = {
- platform = "state";
- entity_id = "binary_sensor.redbutton";
- to = "on";
- };
- condition = {
- condition = "and";
- conditions = [
- {
- condition = "state";
- entity_id = "timer.felix_10h";
- state = "active";
- }
- {
- condition = "time";
- after = "12:00:00";
- before = "22:00:00";
- }
- ];
- };
- action =
- [
- {
- service = "timer.cancel";
- entity_id = [ "timer.felix_10h" "timer.felix_8_30h" "timer.felix_7h" ];
- }
- {
- service = "homeassistant.turn_on";
- entity_id = [ "script.buzz_red_led_fast" ];
- }
- {
- service = "homeassistant.turn_off";
- entity_id = [ "light.status_felix" ];
- }
- ];
- }
-
- {
- alias = "Genug gearbeitet Felix";
- trigger =
- {
- platform = "event";
- event_type = "timer.finished";
- event_data.entity_id = "timer.felix_7h";
- };
- action =
- [
- { service = "light.turn_on";
- data = {
- rgb_color= [0 255 0];
- # effect = "0";
- entity_id = [ "light.status_felix" ];
- };
- }
- ];
- }
-
- {
- alias = "nun aber nach hause";
- trigger =
- {
- platform = "event";
- event_type = "timer.finished";
- event_data.entity_id = "timer.felix_8_30h";
- };
- action =
- [
- { service = "light.turn_on";
- data = {
- rgb_color= [255 255 0];
- # effect = "0";
- entity_id = [ "light.status_felix" ];
- };
- }
- ];
- }
-
- {
- alias = "Zu lange Felix!";
- trigger =
- {
- platform = "event";
- event_type = "timer.finished";
- event_data.entity_id = "timer.felix_10h";
- };
- action =
- [
- {
- service = "notify.telegrambot";
- data = {
- title = "Zu lange Felix!";
- message = "Du bist schon 10 Stunden auf Arbeit, geh jetzt gefälligst nach Hause!";
- };
- }
- {
- service = "homeassistant.turn_on";
- entity_id = [
- "script.buzz_red_led"
- "script.blitz_10s"
- ];
- }
- { service = "light.turn_on";
- data = {
- rgb_color= [255 0 0];
- effect = "0";
- entity_id = [ "light.status_felix" ];
- };
- }
- ];
- }
-]
diff --git a/makefu/2configs/bureautomation/automation/bureau-shutdown.nix b/makefu/2configs/bureautomation/automation/bureau-shutdown.nix
index d54d9762a..007f6064a 100644
--- a/makefu/2configs/bureautomation/automation/bureau-shutdown.nix
+++ b/makefu/2configs/bureautomation/automation/bureau-shutdown.nix
@@ -24,18 +24,10 @@
};
}
{
- service = "tts.google_say";
- entity_id = "media_player.kodi";
- data = {
- message = "Willkommen in deinem Lieblingsbüro";
- language = "de";
- };
- }
- {
service = "notify.telegrambot";
data = {
title = "Bureau Startup";
- message = "Willkommen {{ trigger.platform }}";
+ message = "Das Büro wurde eröffnet";
};
}
];
diff --git a/makefu/2configs/bureautomation/automation/schlechteluft.nix b/makefu/2configs/bureautomation/automation/schlechteluft.nix
new file mode 100644
index 000000000..8787ee280
--- /dev/null
+++ b/makefu/2configs/bureautomation/automation/schlechteluft.nix
@@ -0,0 +1,74 @@
+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";
+ }
+ ];
+ };
+
+ 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";
+ }
+ ];
+ };
+
+ action = [
+ { service = "homeassistant.turn_on";
+ entity_id = [
+ "script.schlechteluft"
+ ];
+ }
+ { service = "tts.google_say";
+ entity_id = "media_player.mpd";
+ data_template = {
+ message = "BEEP BEEP - Die luft ist schon ${toString long_threshold} Minuten schlecht! Student Nummer {{ range(1,500) | random }}, öffne ein Fenster.";
+ language = "de";
+ };
+ }
+ { service = "notify.matrix_notify";
+ data_template.message = "Schlechte Luft Alarm seit ${toString long_threshold} Minuten ({{states.sensor.air_quality.state_with_unit}})!";
+ }
+ ];
+ }
+]
diff --git a/makefu/2configs/bureautomation/combination/10h_timers.nix b/makefu/2configs/bureautomation/combination/10h_timers.nix
new file mode 100644
index 000000000..dec5347a6
--- /dev/null
+++ b/makefu/2configs/bureautomation/combination/10h_timers.nix
@@ -0,0 +1,194 @@
+{lib, ... }:
+let
+ persons = [ "frank" "daniel" "thorsten" "carsten" "thierry" "ecki" "felix"
+ "anthony" # antony
+ "thierry" # tjeri
+ ];
+ random_zu_lange = name: ''{{ [
+ "Du musst jetzt endlich nach Hause gehen ${name}!",
+ "${name} - 10 Stunden sind rum, bald schenkst du den Franzosen deine Lebenszeit",
+ "Nur eine Minute über 10 Stunden kann zu einer Stunde Arbeit für Thorsten werden, ${name}.",
+ "In 10 Minuten kommt dich der Security Mann holen, ${name}",
+ "Das Sandmännchen ist schon vorbei, gleich fallen dir die Augen zu ${name}.",
+ "Wenn ${name} sofort los geht, dann ist er noch rechtzeitig für den Tatort zu Hause.",
+ "${name} muss jetzt gehen, sonst verpasst er die Tagesschau!",
+ "Es ist spät ${name}. Ausstempeln hilft zwar kurzfristig, kann aber zu langfristigen Problemen führen.",
+ "${name}, wenn du nach zehn Stunden nach Hause gehst, muss dir dein Vorgesetzter ein Taxi bestellen",
+ "${name}, wenn du nach zehn Stunden nach Hause gehst, bist du auf dem Rückweg nicht mehr versichert!",
+ "Zu lange, ${name}!" ] | random }}'' ;
+
+
+ random_announce = name: ''{{ [
+ "${name} is in da House",
+ "Ahoi ${name}",
+ "Moinsen ${name}",
+ "Moin Moin ${name}",
+ "Palim, Palim ${name}",
+ "Vorwärts Genosse ${name}",
+ "Gemeinsame Grüße, Genosse ${name}",
+ "Sozialistische Grüße, Genosse ${name}",
+ "Konzentrierte Grüße, Genosse ${name}",
+ "Ach, der ${name} ist auch wieder da...",
+ "Nicht ${name} schon wieder",
+ "Tri tra tralala, der ${name} ist wieder da.",
+ "Na sieh mal einer an, ${name} hat es auch her geschafft",
+ "Wer ist im Büro eingetroffen? ${name} ist es!",
+ "Willkommen in deinem Lieblingsbüro, ${name}.",
+ "Klopf, Klopf, wer ist da? ${name} ist da!",
+ "Messer, Gabel, Schere, Licht sind für kleinen ${name} nicht.",
+ "Ich kenne ein Geheimnis, ${name} ist angekommen",
+ "Wir sind ${name}. Sie werden assimiliert werden",
+ "Achtung, es erfolgt eine Durchsage. ${name} ist eingetroffen",
+ "Die Scanner haben eine dem System bekannte Lebensform mit dem Namen ${name} detektiert",
+ "Das Büro sieht dich, ${name}",
+ "Das Büro riecht dich, ${name}",
+ "Im Kalender von ${name} sind heute acht Meetings eingeplant, von denen zwei bereits verpasst wurden",
+ "Das Postfach von ${name} beinhaltet einhundertachtundzwanzig ungelesene E-Mails.",
+ "Nachricht von Serge: ${name}, bitte melden Sie sich Umgehend bei mir im Büro!",
+ "Luftqualität hat sich durch das Eintreffen von ${name} um zweihunder Punkte verschlechtert, bitte alle Fenster öffnen.",
+ "Die Tür geht auf, wer mag das sein? Schon schreitet hier der ${name} ein. Das Volk, es jubelt, Dirnen schmachten. Fürs Festmahl beginnt man schon zu schlachten. Er wird nur nach dem besten streben! Der ${name}, er soll lange leben!",
+ "${name} arbeitet gern für seinen Konzern",
+ "${name} ist nur froh im Großraumbüro",
+ "Für ${name} ist die schönste Zeit ... die Arbeit",
+ "Ein Fleißbienchen für ${name} zum rechtzeitigen Erscheinen im Büro",
+ "${name} ist heute wohl doch nicht im Office Home",
+ "${name} ist bereit für einen Tag voller Meetings",
+ "Und es startet für ${name} wieder ein Tag im Paradies",
+ "Lieber ${name}, Markus Keck hat dich bereits drei mal Versucht anzurufen!",
+ "Trotz schwerer Männergrippe ist ${name} heute im Büro erschienen.",
+ "${name} kenne keine Parteien mehr, ${name} kenne nur noch Arbeitsplätze",
+ "${name}, Frage nicht, was dein Arbeitsplatz für dich tun kann. Frage, was du für deinen Arbeitsplatz tun kannst",
+ "${name} läuft bis in den Jemen - für sein Unternehmen. ${name} schwimmt bis nach Birma - für meine Firma",
+ "Der Cyberian ${name} ist gekommen um die Bahnwelt vor Cyber-Angriffen zu schützen",
+ "Alles paletto im Ghetto, ${name}?",
+ "Hach, ${name}, wenn du hier rein kommst fühlt es sich gleich wieder an wie Montag.",
+ "Oh nein, nicht schon wieder ${name}",
+ "Wer wohnt in der Ananas ganz tief im Meer? ${name} Schwammkopf!",
+ "Arbeit ist Freizeit! Wachstum ist Fortschritt! Sicherheit ist Freiheit! Eine kleine Erinnerung für ${name}"] | random }}'' ;
+ tmr_10h = name: {
+ "${name}_10h" = {
+ name = "${name} 10h Timer";
+ duration = "10:00:00";
+ };
+ };