summaryrefslogtreecommitdiffstats
path: root/lass/2configs/murmur.nix
blob: 9f325d0af6b03852b48c10797b2403e22caa2a69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ config, lib, pkgs, ... }:
{
  services.murmur = {
    enable = true;
    bandwidth = 10000000;
    registerName = "lassul.us";
    autobanTime = 30;
  };
  krebs.iptables.tables.filter.INPUT.rules = [
    { predicate = "-p tcp --dport 64738"; target = "ACCEPT";}
    { predicate = "-p udp --dport 64738"; target = "ACCEPT";}
  ];

  systemd.services.docker-mumble-web.serviceConfig = {
    StandardOutput = lib.mkForce "journal";
    StandardError = lib.mkForce "journal";
  };
  virtualisation.oci-containers.containers.mumble-web = {
    image = "rankenstein/mumble-web";
    environment = {
      MUMBLE_SERVER = "lassul.us:64738";
    };
    ports = [
      "64739:8080"
    ];
  };

  services.nginx.virtualHosts."mumble.lassul.us" = {
    enableACME = true;
    forceSSL = true;
    locations."/".extraConfig = ''
      proxy_pass http://localhost:64739/;
      proxy_set_header Accept-Encoding "";
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;
    '';
  };
}