diff --git a/hosts/nachtigall/apps/matrix.nix b/hosts/nachtigall/apps/matrix.nix new file mode 100644 index 0000000..e903f3e --- /dev/null +++ b/hosts/nachtigall/apps/matrix.nix @@ -0,0 +1,35 @@ +{ config, pkgs, ... }: +{ + + services.caddy = { + }; + + services.matrix-synapse = { + settings = { + server_name = "pub.solar"; + public_baseurl = "https://matrix.pub.solar/"; + database = { + name = "psycopg2"; + args.host = "/run/postgresql"; + args.user = ""; + args.database = ""; + }; + + app_service_config_files = [ + ]; + }; + + extraConfigFiles = [ + # registration_shared_secret + # mailer + ]; + + plugins = [ + pkgs.matrix-synapse-plugins.matrix-synapse-shared-secret-auth + ]; + }; + + services.postgresql = { + enable = true; + }; +} diff --git a/hosts/nachtigall/apps/mautrix-telegram.nix b/hosts/nachtigall/apps/mautrix-telegram.nix new file mode 100644 index 0000000..ac73eb3 --- /dev/null +++ b/hosts/nachtigall/apps/mautrix-telegram.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: +{ + servies.mautrix-telegram = { + enable = true; + environmentFile = ""; # Secrets + settings = { + appservice = { + database = "psql:////run/postgresql"; + }; + }; + }; +}; diff --git a/hosts/nachtigall/default.nix b/hosts/nachtigall/default.nix index 12e5229..8b51910 100644 --- a/hosts/nachtigall/default.nix +++ b/hosts/nachtigall/default.nix @@ -5,5 +5,6 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ./configuration.nix + ./apps/matrix.nix ]; }