From b9e734b2a034d3ca61f10590703ab86a8f52ffd8 Mon Sep 17 00:00:00 2001 From: buffet Date: Tue, 2 Jul 2024 16:57:06 +0200 Subject: [PATCH] feat: set up weechat and glowing bear --- hosts/ami/default.nix | 1 + hosts/ami/weechat.nix | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 hosts/ami/weechat.nix diff --git a/hosts/ami/default.nix b/hosts/ami/default.nix index 6298506..67dc749 100644 --- a/hosts/ami/default.nix +++ b/hosts/ami/default.nix @@ -19,6 +19,7 @@ ./murmur.nix ./nginx.nix ./upgrade.nix + ./weechat.nix ./woodpecker.nix ../../users/maintainer diff --git a/hosts/ami/weechat.nix b/hosts/ami/weechat.nix new file mode 100644 index 0000000..6959737 --- /dev/null +++ b/hosts/ami/weechat.nix @@ -0,0 +1,35 @@ +{pkgs, ...}: let + port = 6969; +in { + services = { + weechat = { + enable = true; + binary = let + weechat = pkgs.weechat.override { + scripts = with pkgs.weechatScripts; [ + autosort + highmon + ]; + }; + in "${weechat}/bin/weechat-headless"; + }; + + nginx = { + virtualHosts."irc.buffet.sh" = { + useACMEHost = "buffet.sh"; + forceSSL = true; + + locations = { + "^~ /weechat" = { + proxyPass = "http://localhost:${toString port}"; + proxyWebsockets = true; + }; + + "/" = { + root = pkgs.glowing-bear; + }; + }; + }; + }; + }; +}