summaryrefslogtreecommitdiff
path: root/sys/conduit
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-08-07 19:37:51 -0600
committerAlejandro Soto <alejandro@34project.org>2024-08-07 19:54:17 -0600
commit6bf93aea0b48a5476fecfdc2ef06da5816d5fb9e (patch)
treec1eb2dc365be4a7090d76c3bba5ed17461e45101 /sys/conduit
parentda84be8c451308bbad0a70592bdcb0abd975f060 (diff)
sys/conduit, web/sites/matrix: implement conduit matrix homeserver
Diffstat (limited to '')
-rw-r--r--sys/conduit/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/sys/conduit/default.nix b/sys/conduit/default.nix
new file mode 100644
index 0000000..b3a03c4
--- /dev/null
+++ b/sys/conduit/default.nix
@@ -0,0 +1,39 @@
+{ config, lib, ... }:
+with lib; let
+ cfg = config.local.conduit;
+
+ inherit (config.local.domains.matrix.passthru) serverName;
+in
+{
+ options.local.conduit = {
+ enable = mkEnableOption "conduit Matrix homeserver";
+
+ listenAddress = mkOption {
+ type = types.str;
+ default = "127.0.0.1";
+ };
+
+ listenPort = mkOption {
+ type = types.port;
+ default = 6167;
+ };
+ };
+
+ config = mkIf cfg.enable {
+ services.matrix-conduit = {
+ enable = true;
+
+ settings.global = {
+ port = cfg.listenPort;
+ address = cfg.listenAddress;
+ server_name = serverName;
+
+ database_backend = "sqlite";
+
+ allow_encryption = true;
+ allow_federation = true;
+ allow_registration = false;
+ };
+ };
+ };
+}