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; + }; + }; + }; + }; + }; +}