summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-10-28 16:21:19 +0200
committerlassulus <lassulus@lassul.us>2022-10-28 16:21:19 +0200
commitb6f6aee6babee6876a51973d619b867d3145ed25 (patch)
tree65e3bf057b9fd3144c4b1b06a69f347a33312461 /krebs
parentb850c6476fb97b1f01a8db0a0bb13aebb3e48ab9 (diff)
shackie: add .open command
Diffstat (limited to 'krebs')
-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 = {