summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krebs/1systems/puyak/config.nix2
-rw-r--r--krebs/1systems/wolf/config.nix4
-rw-r--r--krebs/2configs/shack/glados/multi/wasser.nix2
-rw-r--r--krebs/2configs/shack/mqtt_sub.nix2
-rw-r--r--krebs/2configs/shack/muell_caller.nix3
-rw-r--r--krebs/2configs/shack/muell_mail.nix3
-rw-r--r--krebs/2configs/shack/muellshack.nix3
-rw-r--r--krebs/2configs/shack/node-light.nix3
-rw-r--r--krebs/2configs/shack/powerraw.nix6
-rw-r--r--krebs/2configs/shack/radioactive.nix3
-rw-r--r--krebs/3modules/makefu/default.nix2
-rw-r--r--makefu/2configs/bureautomation/multi/10h_timers.nix4
-rw-r--r--makefu/2configs/bureautomation/multi/frosch.nix95
-rw-r--r--makefu/5pkgs/python-firetv/default.nix40
14 files changed, 119 insertions, 53 deletions
diff --git a/krebs/1systems/puyak/config.nix b/krebs/1systems/puyak/config.nix
index 6321b6cc4..6493c6df4 100644
--- a/krebs/1systems/puyak/config.nix
+++ b/krebs/1systems/puyak/config.nix
@@ -14,6 +14,8 @@
<stockholm/krebs/2configs/news.nix>
<stockholm/krebs/2configs/news-spam.nix>
<stockholm/krebs/2configs/shack/prometheus/node.nix>
+ <stockholm/krebs/2configs/shack/prometheus/server.nix>
+ <stockholm/krebs/2configs/shack/prometheus/unifi.nix>
<stockholm/krebs/2configs/shack/gitlab-runner.nix>
## Collect local statistics via collectd and send to collectd
diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix
index 6e53637e6..e47c43fe1 100644
--- a/krebs/1systems/wolf/config.nix
+++ b/krebs/1systems/wolf/config.nix
@@ -62,9 +62,9 @@ in
<stockholm/krebs/2configs/shack/netbox.nix>
# prometheus.shack
- <stockholm/krebs/2configs/shack/prometheus/server.nix>
+ #<stockholm/krebs/2configs/shack/prometheus/server.nix>
<stockholm/krebs/2configs/shack/prometheus/node.nix>
- <stockholm/krebs/2configs/shack/prometheus/unifi.nix>
+ #<stockholm/krebs/2configs/shack/prometheus/unifi.nix>
# grafana.shack
<stockholm/krebs/2configs/shack/grafana.nix>
diff --git a/krebs/2configs/shack/glados/multi/wasser.nix b/krebs/2configs/shack/glados/multi/wasser.nix
index da5cac36d..578bb0750 100644
--- a/krebs/2configs/shack/glados/multi/wasser.nix
+++ b/krebs/2configs/shack/glados/multi/wasser.nix
@@ -12,7 +12,7 @@ let
retain = false;
qos = 1;
};
- seconds = 30;
+ seconds = 20;
in
{
switch = [
diff --git a/krebs/2configs/shack/mqtt_sub.nix b/krebs/2configs/shack/mqtt_sub.nix
index a8427dde4..bd0b6df85 100644
--- a/krebs/2configs/shack/mqtt_sub.nix
+++ b/krebs/2configs/shack/mqtt_sub.nix
@@ -29,6 +29,8 @@ in {
User = "nobody";
ExecStart = "${pkg}/bin/sub-new";
PrivateTmp = true;
+ Restart = "always";
+ RestartSec = "15";
};
};
}
diff --git a/krebs/2configs/shack/muell_caller.nix b/krebs/2configs/shack/muell_caller.nix
index 19768cb2e..33f6b8c89 100644
--- a/krebs/2configs/shack/muell_caller.nix
+++ b/krebs/2configs/shack/muell_caller.nix
@@ -33,9 +33,10 @@ in {
chown nobody /tmp/tell.json
'';
ExecStart = "${pkg}/bin/call-muell --cfg /tmp/tell.json --mode mpd loop 60";
- Restart = "always";
PrivateTmp = true;
PermissionsStartOnly = true;
+ Restart = "always";
+ RestartSec = "15";
};
};
}
diff --git a/krebs/2configs/shack/muell_mail.nix b/krebs/2configs/shack/muell_mail.nix
index 39d49918d..a41dbc977 100644
--- a/krebs/2configs/shack/muell_mail.nix
+++ b/krebs/2configs/shack/muell_mail.nix
@@ -26,8 +26,9 @@ in {
WorkingDirectory = home;
PermissionsStartOnly = true;
ExecStart = "${pkg}/bin/muell_mail";
- Restart = "always";
PrivateTmp = true;
+ Restart = "always";
+ RestartSec = "15";
};
};
}
diff --git a/krebs/2configs/shack/muellshack.nix b/krebs/2configs/shack/muellshack.nix
index 1e6843bdf..9168c9ba7 100644
--- a/krebs/2configs/shack/muellshack.nix
+++ b/krebs/2configs/shack/muellshack.nix
@@ -36,8 +36,9 @@ in {
'';
WorkingDirectory = home;
ExecStart = "${pkg}/bin/muellshack";
- Restart = "always";
PrivateTmp = true;
+ Restart = "always";
+ RestartSec = "15";
};
};
}
diff --git a/krebs/2configs/shack/node-light.nix b/krebs/2configs/shack/node-light.nix
index 63772f182..8cf0007b8 100644
--- a/krebs/2configs/shack/node-light.nix
+++ b/krebs/2configs/shack/node-light.nix
@@ -46,8 +46,9 @@ in {
'';
WorkingDirectory = home;
ExecStart = "${pkg}/bin/node-light";
- Restart = "always";
PrivateTmp = true;
+ Restart = "always";
+ RestartSec = "15";
};
};
}
diff --git a/krebs/2configs/shack/powerraw.nix b/krebs/2configs/shack/powerraw.nix
index af3f129c1..4118e7a72 100644
--- a/krebs/2configs/shack/powerraw.nix
+++ b/krebs/2configs/shack/powerraw.nix
@@ -22,8 +22,9 @@ in {
serviceConfig = {
User = "powermeter";
ExecStart = "${pkg}/bin/powermeter-serial2mqtt";
- Restart = "always";
PrivateTmp = true;
+ Restart = "always";
+ RestartSec = "15";
};
};
@@ -33,8 +34,9 @@ in {
serviceConfig = {
User = "powermeter";
ExecStart = "${pkg}/bin/powermeter-mqtt2socket";
- Restart = "always";
PrivateTmp = true;
+ Restart = "always";
+ RestartSec = "15";
};
};
diff --git a/krebs/2configs/shack/radioactive.nix b/krebs/2configs/shack/radioactive.nix
index 566146d6e..286a73aae 100644
--- a/krebs/2configs/shack/radioactive.nix
+++ b/krebs/2configs/shack/radioactive.nix
@@ -27,9 +27,10 @@ in {
serviceConfig = {
User = "nobody"; # TODO separate user
ExecStart = "${pkg}/bin/radioactive-add-many loop 60";
- Restart = "always";
PrivateTmp = true;
PermissionsStartOnly = true;
+ Restart = "always";
+ RestartSec = "15";
};
};
}
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix
index ab24d9096..f9e8d485c 100644
--- a/krebs/3modules/makefu/default.nix
+++ b/krebs/3modules/makefu/default.nix
@@ -184,7 +184,7 @@ in {
nixos.unstable IN CNAME krebscode.github.io.
o.euer IN A ${nets.internet.ip4.addr}
photostore IN A ${nets.internet.ip4.addr}
- pigstarter IN A ${nets.internet.ip4.addr}
+ pigstarter IN CNAME makefu.github.io.
share.euer IN A ${nets.internet.ip4.addr}
wg.euer IN A ${nets.internet.ip4.addr}
wiki.euer IN A ${nets.internet.ip4.addr}
diff --git a/makefu/2configs/bureautomation/multi/10h_timers.nix b/makefu/2configs/bureautomation/multi/10h_timers.nix
index 53bfd3725..8cdaa8cfd 100644
--- a/makefu/2configs/bureautomation/multi/10h_timers.nix
+++ b/makefu/2configs/bureautomation/multi/10h_timers.nix
@@ -57,7 +57,7 @@ let
"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",
+ "${name} läuft bis in den Jemen - für sein Unternehmen. ${name} schwimmt bis nach Birma - für seine 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.",
@@ -147,7 +147,7 @@ let
}
{ service = "homeassistant.turn_on";
entity_id = [
- "switch.fernseher"
+ # "switch.fernseher"
"script.blitz_10s"
"script.announce_${name}"
];
diff --git a/makefu/2configs/bureautomation/multi/frosch.nix b/makefu/2configs/bureautomation/multi/frosch.nix
new file mode 100644
index 000000000..de93ce2b7
--- /dev/null
+++ b/makefu/2configs/bureautomation/multi/frosch.nix
@@ -0,0 +1,95 @@
+{ lib }:
+let
+
+ random_pommes = '' {{ [
+ "Nur ein Pommes Tag ist ein guter Tag",
+ "Schaut wie schön sie fliegen, die Pommes Seifenblasen",
+ "zwo ... eins ... Pommes Zeit",
+ "I cannot believe it is not Pommes",
+ "Naja, wenn es sonst schon nichts anderes gibt, kann man jetzt auch pommes nehmen",
+ "Wenn Aramark was kann, dann ist es frittieren",
+ "Einmal das Hauptgericht mit Pommes, ohne Hauptgericht",
+ "Rieche ich da etwa Pommes? JA!",
+ "Pommes ist auch nur Gemüse,also keine Reue und schlag zu!",
+ "Mit nur fünf Portionen Pommes kann man schon satt werden.",
+ "Heute für Sie, 15 Pommes von hand abgezählt",
+ "Der Weltmarktpreis von Pommes ist durch verschiedene Weltkrisen leider so hoch, dass Aramark den Verkaufspreis verdoppeln musste.",
+ "Vorfreude, schönste Freude, Freude bei Aramark. Pommes in die Schale rein, alle Kunden werden glücklich sein.",
+ "In 15 Minuten ist es wieder so weit, es ist Pommes Zeit!"] | random }}'';
+in {
+ sensor = [
+ { platform = "mqtt";
+ name = "frosch brightness";
+ device_class = "illuminance";
+ state_topic = "/bam/frosch/sensor/brightness/state";
+ availability_topic = "/bam/frosch/status";
+ payload_available = "online";
+ payload_not_available = "offline";
+ }
+ ];
+ binary_sensor = [
+ { platform = "mqtt";
+ name = "frosch auge";
+ state_topic = "/bam/frosch/binary_sensor/froschauge/state";
+ availability_topic = "/bam/frosch/status";
+ payload_available = "online";
+ payload_not_available = "offline";
+ }
+ ];
+ switch = [
+ { platform = "mqtt";
+ name = "frosch blasen";
+ state_topic = "/bam/frosch/switch/blasen/state";
+ command_topic = "/bam/frosch/switch/blasen/command";
+ availability_topic = "/bam/frosch/status";
+ payload_available = "online";
+ payload_not_available = "offline";
+ }
+ ];
+ light = [];
+ automation = [
+ { alias = "Pommeszeit";
+ trigger = {
+ platform = "time";
+ at = "12:15:00";
+ };
+ condition = {
+ condition = "state";
+ entity_id = "binary_sensor.pommes"; # from multi/aramark.nix
+ state = "on";
+ };
+ action = [
+ { service = "homeassistant.turn_on";
+ entity_id = [
+ "script.pommes_announce"
+ "script.seifenblasen_30s" # from script/multi_blink.nix
+ ];
+ }
+ ];
+ }
+ ];
+ script = {
+ pommes_announce = {
+ alias = "Random Pommes announce";
+ sequence = [
+ {
+ service = "media_player.play_media";
+ data = {
+ entity_id = "media_player.mpd";
+ media_content_type = "playlist";
+ media_content_id = "ansage";
+ };
+ }
+ { delay.seconds = 5; }
+ {
+ service = "tts.google_say";
+ entity_id = "media_player.mpd";
+ data_template = {
+ message = random_pommes;
+ language = "de";
+ };
+ }
+ ];
+ };
+ };
+}
diff --git a/makefu/5pkgs/python-firetv/default.nix b/makefu/5pkgs/python-firetv/default.nix
deleted file mode 100644
index 593f4e718..000000000
--- a/makefu/5pkgs/python-firetv/default.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ lib, pkgs, python2Packages, ... }:
-# requires libusb1 from unstable
-with python2Packages; let
-
- python-adb = buildPythonPackage rec {
- pname = "adb";
- version = "1.2.0";
-
- src = fetchPypi {
- inherit pname version;
- sha256 = "0v4my47ikgkbq04gdllpx6kql5cfh7dnpq2fk72x03z74mqri7v8";
- };
-
- propagatedBuildInputs = [ libusb1 m2crypto ];
- meta = {
- homepage = https://github.com/google/python-adb;
- description = "Python ADB + Fastboot implementation";
- license = lib.licenses.asl20;
- };
- };
-in
- buildPythonPackage rec {
- name = "python-firetv-${version}";
- version = "1.0.5";
-
- src = pkgs.fetchFromGitHub {
- owner = "happyleavesaoc";
- repo = "python-firetv";
- # rev = version;
- rev = "55406c6";
- sha256 = "1r2yighilchs0jvcvbngkjxkk7gp588ikcl64x7afqzxc6zxv7wp";
- };
-
- propagatedBuildInputs = [ python-adb flask pyyaml ];
- meta = {
- homepage = https://github.com/happyleavesaoc/python-firetv;
- description = "provides state informations and some control of an amazon firetv";
- license = lib.licenses.mit;
- };
-}