diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index 9abe613..abeb606 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -35,7 +35,7 @@ bitwarden.enable = true; discord.enable = true; ladybird.enable = true; - matrix.enable = true; + nheko.enable = true; obs.enable = true; onlyoffice.enable = true; signal.enable = true; diff --git a/modules/home/application/matrix/default.nix b/modules/home/application/matrix/default.nix deleted file mode 100644 index 1a33a0c..0000000 --- a/modules/home/application/matrix/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ 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 ]; - }; -} diff --git a/modules/home/application/nheko/default.nix b/modules/home/application/nheko/default.nix new file mode 100644 index 0000000..b04b375 --- /dev/null +++ b/modules/home/application/nheko/default.nix @@ -0,0 +1,15 @@ +{ 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 ]; + }; +} diff --git a/modules/nixos/services/communication/conduit/default.nix b/modules/nixos/services/communication/conduit/default.nix index 13a2cbc..aa4d5c1 100644 --- a/modules/nixos/services/communication/conduit/default.nix +++ b/modules/nixos/services/communication/conduit/default.nix @@ -16,25 +16,17 @@ in # virtualisation.podman.enable = true; # }; - networking.firewall.allowedTCPPorts = [ 4001 8448 ]; - services = { matrix-conduit = { enable = true; settings.global = { - address = "::"; + address = "::1"; port = 4001; - server_name = "matrix.kruining.eu"; - database_backend = "rocksdb"; - # database_path = "/var/lib/matrix-conduit/"; - allow_check_for_updates = false; - allow_registration = false; - - enable_lightning_bolt = false; + server_name = "chris-matrix"; }; }; @@ -51,25 +43,11 @@ in caddy = { enable = true; - virtualHosts = let - inherit (builtins) toJSON; + virtualHosts = { + ${domain}.extraConfig = '' + # import auth-z - 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 + # reverse_proxy http://127.0.0.1:5002 ''; }; };