Compare commits

...

2 commits

Author SHA1 Message Date
Chris Kruining
d4eff47049
finally have a working matrix set up
Some checks failed
Test action / kaas (push) Failing after 1s
2025-09-11 10:53:17 +02:00
Chris Kruining
cc2f7bbea4
replace nheko with fractal 2025-09-11 10:53:10 +02:00
4 changed files with 45 additions and 23 deletions

View file

@ -35,7 +35,7 @@
bitwarden.enable = true; bitwarden.enable = true;
discord.enable = true; discord.enable = true;
ladybird.enable = true; ladybird.enable = true;
nheko.enable = true; matrix.enable = true;
obs.enable = true; obs.enable = true;
onlyoffice.enable = true; onlyoffice.enable = true;
signal.enable = true; signal.enable = true;

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, namespace, osConfig ? {}, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.application.matrix;
in
{
options.${namespace}.application.matrix = {
enable = mkEnableOption "enable Matrix client (Fractal)";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ fractal ];
};
}

View file

@ -1,15 +0,0 @@
{ config, lib, pkgs, namespace, osConfig ? {}, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.application.nheko;
in
{
options.${namespace}.application.nheko = {
enable = mkEnableOption "enable nheko (matrix client)";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ nheko ];
};
}

View file

@ -16,17 +16,25 @@ in
# virtualisation.podman.enable = true; # virtualisation.podman.enable = true;
# }; # };
networking.firewall.allowedTCPPorts = [ 4001 8448 ];
services = { services = {
matrix-conduit = { matrix-conduit = {
enable = true; enable = true;
settings.global = { settings.global = {
address = "::1"; address = "::";
port = 4001; port = 4001;
database_backend = "rocksdb"; server_name = "matrix.kruining.eu";
server_name = "chris-matrix"; database_backend = "rocksdb";
# database_path = "/var/lib/matrix-conduit/";
allow_check_for_updates = false;
allow_registration = false;
enable_lightning_bolt = false;
}; };
}; };
@ -43,11 +51,25 @@ in
caddy = { caddy = {
enable = true; enable = true;
virtualHosts = { virtualHosts = let
${domain}.extraConfig = '' inherit (builtins) toJSON;
# import auth-z
# reverse_proxy http://127.0.0.1:5002 server = {
"m.server" = "${domain}:443";
};
client = {
"m.homeserver".base_url = "https://${domain}";
"m.identity_server".base_url = "https://auth.amarth.cloud";
};
in {
"${domain}".extraConfig = ''
header /.well-known/matrix/* Content-Type application/json
header /.well-known/matrix/* Access-Control-Allow-Origin *
respond /.well-known/matrix/server `${toJSON server}`
respond /.well-known/matrix/client `${toJSON client}`
reverse_proxy /_matrix/* http://::1:4001
# reverse_proxy /_synapse/client/* http://::1:4001
''; '';
}; };
}; };