summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRobert Schütz <dev@schuetz-co.de>2021-05-05 12:34:24 +0200
committerRobert Schütz <dev@schuetz-co.de>2021-05-05 12:38:02 +0200
commitf82c6fdfd5c61b87f5bf19174727fb903e7c6e38 (patch)
tree7c71a6f57405500af89a5dc3b94e04c1d648177f /nixos
parent007cab96448921b45547a6bc85117052cbc2429a (diff)
downloadnixpkgs-f82c6fdfd5c61b87f5bf19174727fb903e7c6e38.tar
nixpkgs-f82c6fdfd5c61b87f5bf19174727fb903e7c6e38.tar.gz
nixpkgs-f82c6fdfd5c61b87f5bf19174727fb903e7c6e38.tar.bz2
nixpkgs-f82c6fdfd5c61b87f5bf19174727fb903e7c6e38.tar.lz
nixpkgs-f82c6fdfd5c61b87f5bf19174727fb903e7c6e38.tar.xz
nixpkgs-f82c6fdfd5c61b87f5bf19174727fb903e7c6e38.tar.zst
nixpkgs-f82c6fdfd5c61b87f5bf19174727fb903e7c6e38.zip
nixos/matrix-dendrite: rename to dendrite
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/module-list.nix2
-rw-r--r--nixos/modules/services/misc/dendrite.nix (renamed from nixos/modules/services/misc/matrix-dendrite.nix)26
2 files changed, 14 insertions, 14 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 0c0935a7992..53f0f6e351e 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -472,6 +472,7 @@
   ./services/misc/cgminer.nix
   ./services/misc/confd.nix
   ./services/misc/couchpotato.nix
+  ./services/misc/dendrite.nix
   ./services/misc/devmon.nix
   ./services/misc/dictd.nix
   ./services/misc/duckling.nix
@@ -514,7 +515,6 @@
   ./services/misc/mame.nix
   ./services/misc/matrix-appservice-discord.nix
   ./services/misc/matrix-appservice-irc.nix
-  ./services/misc/matrix-dendrite.nix
   ./services/misc/matrix-synapse.nix
   ./services/misc/mautrix-telegram.nix
   ./services/misc/mbpfan.nix
diff --git a/nixos/modules/services/misc/matrix-dendrite.nix b/nixos/modules/services/misc/dendrite.nix
index 24051e0b3b4..c967fc3a362 100644
--- a/nixos/modules/services/misc/matrix-dendrite.nix
+++ b/nixos/modules/services/misc/dendrite.nix
@@ -1,12 +1,12 @@
 { config, lib, pkgs, ... }:
 let
-  cfg = config.services.matrix-dendrite;
+  cfg = config.services.dendrite;
   settingsFormat = pkgs.formats.yaml { };
   configurationYaml = settingsFormat.generate "dendrite.yaml" cfg.settings;
-  workingDir = "/var/lib/matrix-dendrite";
+  workingDir = "/var/lib/dendrite";
 in
 {
-  options.services.matrix-dendrite = {
+  options.services.dendrite = {
     enable = lib.mkEnableOption "matrix.org dendrite";
     httpPort = lib.mkOption {
       type = lib.types.nullOr lib.types.port;
@@ -24,7 +24,7 @@ in
     };
     tlsCert = lib.mkOption {
       type = lib.types.nullOr lib.types.path;
-      example = "/var/lib/matrix-dendrite/server.cert";
+      example = "/var/lib/dendrite/server.cert";
       default = null;
       description = ''
         The path to the TLS certificate.
@@ -36,7 +36,7 @@ in
     };
     tlsKey = lib.mkOption {
       type = lib.types.nullOr lib.types.path;
-      example = "/var/lib/matrix-dendrite/server.key";
+      example = "/var/lib/dendrite/server.key";
       default = null;
       description = ''
         The path to the TLS key.
@@ -48,7 +48,7 @@ in
     };
     environmentFile = lib.mkOption {
       type = lib.types.nullOr lib.types.path;
-      example = "/var/lib/matrix-dendrite/registration_secret";
+      example = "/var/lib/dendrite/registration_secret";
       default = null;
       description = ''
         Environment file as defined in <citerefentry>
@@ -62,7 +62,7 @@ in
 
         <programlisting>
           # snippet of dendrite-related config
-          services.matrix-dendrite.settings.client_api.registration_shared_secret = "$REGISTRATION_SHARED_SECRET";
+          services.dendrite.settings.client_api.registration_shared_secret = "$REGISTRATION_SHARED_SECRET";
         </programlisting>
 
         <programlisting>
@@ -140,7 +140,7 @@ in
       '';
     }];
 
-    systemd.services.matrix-dendrite = {
+    systemd.services.dendrite = {
       description = "Dendrite Matrix homeserver";
       after = [
         "network.target"
@@ -149,22 +149,22 @@ in
       serviceConfig = {
         Type = "simple";
         DynamicUser = true;
-        StateDirectory = "matrix-dendrite";
+        StateDirectory = "dendrite";
         WorkingDirectory = workingDir;
-        RuntimeDirectory = "matrix-dendrite";
+        RuntimeDirectory = "dendrite";
         RuntimeDirectoryMode = "0700";
         EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
         ExecStartPre =
           if (cfg.environmentFile != null) then ''
             ${pkgs.envsubst}/bin/envsubst \
               -i ${configurationYaml} \
-              -o /run/matrix-dendrite/dendrite.yaml
+              -o /run/dendrite/dendrite.yaml
           '' else ''
-            ${pkgs.coreutils}/bin/cp ${configurationYaml} /run/matrix-dendrite/dendrite.yaml
+            ${pkgs.coreutils}/bin/cp ${configurationYaml} /run/dendrite/dendrite.yaml
           '';
         ExecStart = lib.strings.concatStringsSep " " ([
           "${pkgs.dendrite}/bin/dendrite-monolith-server"
-          "--config /run/matrix-dendrite/dendrite.yaml"
+          "--config /run/dendrite/dendrite.yaml"
         ] ++ lib.optionals (cfg.httpPort != null) [
           "--http-bind-address :${builtins.toString cfg.httpPort}"
         ] ++ lib.optionals (cfg.httpsPort != null) [