summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-09-05 21:11:11 +0200
committertv <tv@krebsco.de>2023-09-05 21:38:52 +0200
commitab1d0479e90f11806d4703ec6fffed3d5f782914 (patch)
treee2ec888498521c0599ea30ce189dc0b85c70b0a7 /tv/2configs
parenta960ac592634f032a73702ecc774f65ec21e5af6 (diff)
tv weechat-server: init
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/weechat-server.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/tv/2configs/weechat-server.nix b/tv/2configs/weechat-server.nix
new file mode 100644
index 0000000..41f157c
--- /dev/null
+++ b/tv/2configs/weechat-server.nix
@@ -0,0 +1,24 @@
+{ config, pkgs, ... }: {
+ users.users.tv.packages = [
+ (pkgs.writers.writeDashBin "weechat-client" ''
+ set -efu
+ exec ${pkgs.tmux}/bin/tmux attach -t weechat
+ '')
+ ];
+ systemd.services.weechat = {
+ wantedBy = [ "multi-user.target" ];
+ environment = {
+ TERM = "rxvt-unicode-256color";
+ };
+ serviceConfig = {
+ ExecStart = "${pkgs.tmux}/bin/tmux new -d -s weechat ${pkgs.weechat}/bin/weechat";
+ OOMScoreAdjust = -1000;
+ Restart = "always";
+ RestartSec = "100ms";
+ Type = "forking";
+ StartLimitBurst = 0;
+ User = "tv";
+ WorkingDirectory = "/home/tv";
+ };
+ };
+}