summaryrefslogtreecommitdiffstats
path: root/krebs/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/2configs')
-rw-r--r--krebs/2configs/shack/reaktor.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/krebs/2configs/shack/reaktor.nix b/krebs/2configs/shack/reaktor.nix
index a31c7a687..76e66f692 100644
--- a/krebs/2configs/shack/reaktor.nix
+++ b/krebs/2configs/shack/reaktor.nix
@@ -14,6 +14,21 @@
];
};
}
+ {
+ plugin = "system";
+ config = {
+ hooks.PRIVMSG = [
+ {
+ pattern = ".open$";
+ activate = "match";
+ command.filename = pkgs.writers.writeDash "is_shack_open" ''
+ ${pkgs.curl}/bin/curl -fSsk https://api.shackspace.de/v1/space |
+ ${pkgs.jq}/bin/jq '.doorState.open'
+ '';
+ }
+ ];
+ };
+ }
];
};
systemd.services.announce_doorstatus = {