summary refs log tree commit diff
path: root/nixos/modules/services/networking/lambdabot.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2015-04-20 16:51:14 +0300
committerNikolay Amiantov <ab@fmap.me>2015-04-20 18:56:48 +0300
commit0f5d5f9d124037d781e67bbfdef0577d9f92820a (patch)
tree0e85cfc1a38d301ff42e35d7980d2519da9b3923 /nixos/modules/services/networking/lambdabot.nix
parent91f3912b5d4fb1f5631de8b67d439b1838df7e4f (diff)
downloadnixpkgs-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar
nixpkgs-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.gz
nixpkgs-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.bz2
nixpkgs-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.lz
nixpkgs-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.xz
nixpkgs-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.zst
nixpkgs-0f5d5f9d124037d781e67bbfdef0577d9f92820a.zip
lambdabot: add named pipe for incoming commands
Diffstat (limited to 'nixos/modules/services/networking/lambdabot.nix')
-rw-r--r--nixos/modules/services/networking/lambdabot.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/lambdabot.nix b/nixos/modules/services/networking/lambdabot.nix
index 3230ef2be85..4ef7c7c9ab6 100644
--- a/nixos/modules/services/networking/lambdabot.nix
+++ b/nixos/modules/services/networking/lambdabot.nix
@@ -52,9 +52,18 @@ in
       script = ''
         mkdir -p ~/.lambdabot
         cd ~/.lambdabot
-        exec ${cfg.package}/bin/lambdabot -e 'rc ${rc}'
+        mkfifo /run/lambdabot/offline
+        (
+          echo 'rc ${rc}'
+          while true; do
+            cat /run/lambdabot/offline
+          done
+        ) | ${cfg.package}/bin/lambdabot
       '';
-      serviceConfig.User = "lambdabot";
+      serviceConfig = {
+        User = "lambdabot";
+        RuntimeDirectory = [ "lambdabot" ];
+      };
     };
 
     users.extraUsers.lambdabot = {