yep, more dotfiles

server: add matrix-conduit

wiro.world 74d7e98b 683e0b04

verified
Changed files
+46
nixos
profiles
secrets
+35
nixos/profiles/server.nix
···
authelia-port = 3008;
authelia-hostname = "auth.wiro.world";
+
matrix-port = 3009;
+
matrix-hostname = "matrix.wiro.world";
+
prometheus-port = 9001;
prometheus-node-exporter-port = 9002;
headscale-metrics-port = 9003;
···
}
'' +
''
+
reverse_proxy /.well-known/matrix/* http://localhost:${toString matrix-port}
+
'' +
+
''
reverse_proxy https://mrnossiom.github.io {
header_up Host {http.request.host}
}
···
virtualHosts.${authelia-hostname}.extraConfig = ''
reverse_proxy http://localhost:${toString authelia-port}
+
'';
+
+
virtualHosts.${matrix-hostname}.extraConfig = ''
+
reverse_proxy /_matrix/* http://localhost:${toString matrix-port}
'';
};
···
};
};
};
+
+
age.secrets.matrix-env.file = ../../secrets/matrix-env.age;
+
services.matrix-conduit = {
+
enable = true;
+
package = upkgs.matrix-conduit;
+
+
settings.global = {
+
address = "127.0.0.1";
+
port = matrix-port;
+
+
server_name = "wiro.world";
+
well_known = {
+
client = "https://matrix.wiro.world";
+
server = "matrix.wiro.world:443";
+
};
+
+
database_backend = "sqlite";
+
enable_lightning_bolt = false;
+
+
# Set in `CONDUIT_REGISTRATION_TOKEN`
+
# registration_token = ...;
+
allow_registration = true;
+
};
+
};
+
systemd.services.conduit.serviceConfig.EnvironmentFile = config.age.secrets.matrix-env.path;
};
}
+9
secrets/matrix-env.age
···
+
age-encryption.org/v1
+
-> ssh-ed25519 sMF1bg ynWhH67Y3AynyxoD9WmVKgNTAyb7ktUYUkRniXvfslw
+
hlN/NsBEhTwkeaSdCd6uj/U2X9wi/cFwwjIhDUYWtYQ
+
-> ssh-ed25519 SmMcWg SXQ91ashcl6UJMPAV/7mI950cczhMAJrjcnkdck8DWw
+
mndS8XyN+e1A4WRCU9dJ6bF50wrFnK6GPaJy/HJyMMA
+
-> ssh-ed25519 Q8rMFA g3PNPWKFO8Rf473kBaTuZUnalCI7b8Wl6W9qA7ldv2M
+
9UfrXGhwc5Fn42UFr1sHIvtFp0QeqAvu4bhkjEolTZs
+
--- vzV9NNriSPI4sc2eiJZ0HlxGG9f+BRwsALPWdmEoG84
+
�m�eqW{ kU����/���mb[\���F*<, 02MM���x�0��)��+��Zy�Ws-0e��o6Uv�o��0o W>"S��� 8�(#
+2
secrets/secrets.nix
···
"authelia-storage-key.age".publicKeys = deploy;
"authelia-ldap-password.age".publicKeys = deploy;
"authelia-smtp-password.age".publicKeys = deploy;
+
# Defines `CONDUIT_REGISTRATION_TOKEN`
+
"matrix-env.age".publicKeys = deploy;
# Not used in config but useful
"pgp-ca5e.age".publicKeys = users;