summary refs log tree commit diff
path: root/host/Rory-nginx/services/matrix/draupnir.nix
blob: 8be10bc8fb23878288730393de672de3edbe6f59 (plain) (blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ pkgs, draupnirSrc, ... }:

{
  services.draupnir = {
    package = (pkgs.draupnir.overrideAttrs (oldAttrs: {
      src = draupnirSrc;
      version = draupnirSrc.rev;
    }));
  
    enable = true;
    homeserverUrl = "https://matrix.rory.gay";
    accessTokenFile = "/etc/draupnir-access-token";

    #pantalaimon = {
    #  enable = false;
    #  username = "draupnir";
    #  passwordFile = "/etc/draupnir-password";
    #  options = {
        #homeserver = "http://localhost:8008";
        #ssl = false;
    #  };
    #};
    settings = {
      managementRoom = "#draupnir-mgmt:rory.gay";
      verboseLogging = false;
      recordIgnoredInvites = true; # Let's log ignored invites, just incase
      autojoinOnlyIfManager = true; # Let's not open ourselves up to DoS attacks
      automaticallyRedactForReasons = [ "*" ]; # I always want autoredact
      fasterMembershipChecks = true;
      #roomStateBackingStore.enabled = true; # broken under nix.

      backgroundDelayMS = 10; # delay isn't needed, I don't mind the performance hit
      pollReports = false; # this is a single person homeserver... let's save ourself the work

      admin.enableMakeRoomAdminCommand = true;
      commands.ban.defaultReasons = [
        "spam"
        "harassment"
        "transphobia"
        "scam"
      ];
      protections = {
        wordlist = {
          words = [
            "tranny"
            "faggot"
            "ywnbaw"
            "nigger"
          ];
          minutesBeforeTrusting = 0;
        };
      };
    };
  };
}