~sumner/nixos-configuration

ref: f4eb6417bc48729411263dc754fbe8c63a65d5bf nixos-configuration/modules/services/matrix/mjolnir.nix -rw-r--r-- 1.0 KiB
f4eb6417Sumner Evans standupbot: 0.4.1rc2 0.4.1rc3 8 months ago
                                                                                
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
{ config, lib, pkgs, ... }: with lib; let
  mjolnirCfg = config.services.mjolnir;
in
{
  imports = [
    ./mjolnir-pr-123896/modules/matrix/mjolnir.nix
    ./mjolnir-pr-123896/modules/matrix/pantalaimon.nix
  ];

  nixpkgs.overlays = [
    (self: super: {
      mjolnir = self.callPackage ./mjolnir-pr-123896/pkgs/mjolnir { };
      pantalaimon-headless = self.pantalaimon.overridePythonAttrs {
        propagatedBuildInputs = with pkgs.python3Packages; [
          aiohttp
          appdirs
          attrs
          click
          janus
          keyring
          Logbook
          matrix-nio
          peewee
          prompt-toolkit
          setuptools
        ];
      };
    })
  ];

  services.mjolnir = {
    homeserverUrl = "http://localhost:8008";

    pantalaimon = {
      enable = true;
      username = "marshal";
      passwordFile = "/etc/nixos/secrets/matrix/bots/marshal";
      options.listenPort = 8100;
    };

    managementRoom = "#mjolnir:nevarro.space";

    settings = {
      protectAllJoinedRooms = true;
    };
  };
}