summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/shack/events-publisher
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2023-07-28 22:24:15 +0200
committermakefu <github@syntax-fehler.de>2023-07-28 22:24:15 +0200
commit060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch)
tree2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/2configs/shack/events-publisher
parentcbfcc890e3b76d942b927809bf981a5fa7289e6a (diff)
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/2configs/shack/events-publisher')
-rw-r--r--makefu/2configs/shack/events-publisher/default.nix49
1 files changed, 0 insertions, 49 deletions
diff --git a/makefu/2configs/shack/events-publisher/default.nix b/makefu/2configs/shack/events-publisher/default.nix
deleted file mode 100644
index 964e5ccb..00000000
--- a/makefu/2configs/shack/events-publisher/default.nix
+++ /dev/null
@@ -1,49 +0,0 @@
-{ pkgs, ... }:
-with import <stockholm/lib>;
-let
- shack-announce = pkgs.callPackage (builtins.fetchTarball {
- url = "https://github.com/makefu/events-publisher/archive/419afdfe16ebf7f2360d2ba64b67ca88948832bd.tar.gz";
- sha256 = "0rn1ykgjbd79zg03maa49kzi6hpzn4xzf4j93qgx5wax7h12qjx0";
- }) {} ;
- home = "/var/lib/shackannounce";
- user = "shackannounce";
- creds = (toString <secrets>) + "/shack-announce.json";
- LOL = "DEBUG";
-in
-{
- users.users.${user}= {
- uid = genid user;
- inherit home;
- createHome = true;
- };
- systemd.services.shack-announce = {
- description = "Announce shack events";
- startAt = "*:0/30";
- path = [ shack-announce ];
- serviceConfig = {
- WorkingDirectory = home;
- User = user;
- PermissionsStartOnly = true;
- ExecStartPre = pkgs.writeDash "shack-announce-pre" ''
- set -eu
- cp ${creds} creds.json
- chown ${user} creds.json
- '';
- ExecStart = pkgs.writeDash "shack-announce" ''
- if test ! -e announce.state; then
- echo "initializing state"
- announce-daemon \
- --lol ${LOL} \
- --creds creds.json \
- --state announce.state \
- --clean --init
- fi
- echo "Running announce"
- announce-daemon \
- --lol ${LOL} \
- --creds creds.json \
- --state announce.state
- '';
- };
- };
-}