diff options
author | Nikolay Amiantov <ab@fmap.me> | 2015-04-20 16:51:14 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2015-04-20 18:56:48 +0300 |
commit | 0f5d5f9d124037d781e67bbfdef0577d9f92820a (patch) | |
tree | 0e85cfc1a38d301ff42e35d7980d2519da9b3923 /nixos/modules/services/networking/lambdabot.nix | |
parent | 91f3912b5d4fb1f5631de8b67d439b1838df7e4f (diff) | |
download | nixlib-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar nixlib-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.gz nixlib-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.bz2 nixlib-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.lz nixlib-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.xz nixlib-0f5d5f9d124037d781e67bbfdef0577d9f92820a.tar.zst nixlib-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.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/lambdabot.nix b/nixos/modules/services/networking/lambdabot.nix index 3230ef2be85f..4ef7c7c9ab63 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 = { |