summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/deployment/events-publisher/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-11-10 19:52:37 +0100
committertv <tv@krebsco.de>2018-11-10 19:52:37 +0100
commit5ea1c2fcbb5756ef99d5fade8a7cd9e33b04a0c6 (patch)
treef6edbd9d1ff68773f413065a1f1c5dd71150be1a /makefu/2configs/deployment/events-publisher/default.nix
parent9a801fa642a60a2c46240670b4e3ad66ea77d995 (diff)
parent05b288604e7e653efb6035b9953aa849e6e6bc19 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'makefu/2configs/deployment/events-publisher/default.nix')
-rw-r--r--makefu/2configs/deployment/events-publisher/default.nix49
1 files changed, 0 insertions, 49 deletions
diff --git a/makefu/2configs/deployment/events-publisher/default.nix b/makefu/2configs/deployment/events-publisher/default.nix
deleted file mode 100644
index 37d74c282..000000000
--- a/makefu/2configs/deployment/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/c5218195e6afdc646cb7682d8f355a7ec2b90716.tar.gz";
- sha256 = "0xk74q7gah3l5zy3bkvih3k9fr1hclvf71rm3ixcmslhicl7khav";
- }) {} ;
- 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
- '';
- };
- };
-}