mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 01:24:47 +00:00
Merge pull request #121785 from dotlambda/dendrite-rename
matrix-dendrite: rename to dendrite
This commit is contained in:
commit
7217b2d85e
@ -472,6 +472,7 @@
|
|||||||
./services/misc/cgminer.nix
|
./services/misc/cgminer.nix
|
||||||
./services/misc/confd.nix
|
./services/misc/confd.nix
|
||||||
./services/misc/couchpotato.nix
|
./services/misc/couchpotato.nix
|
||||||
|
./services/misc/dendrite.nix
|
||||||
./services/misc/devmon.nix
|
./services/misc/devmon.nix
|
||||||
./services/misc/dictd.nix
|
./services/misc/dictd.nix
|
||||||
./services/misc/duckling.nix
|
./services/misc/duckling.nix
|
||||||
@ -514,7 +515,6 @@
|
|||||||
./services/misc/mame.nix
|
./services/misc/mame.nix
|
||||||
./services/misc/matrix-appservice-discord.nix
|
./services/misc/matrix-appservice-discord.nix
|
||||||
./services/misc/matrix-appservice-irc.nix
|
./services/misc/matrix-appservice-irc.nix
|
||||||
./services/misc/matrix-dendrite.nix
|
|
||||||
./services/misc/matrix-synapse.nix
|
./services/misc/matrix-synapse.nix
|
||||||
./services/misc/mautrix-telegram.nix
|
./services/misc/mautrix-telegram.nix
|
||||||
./services/misc/mbpfan.nix
|
./services/misc/mbpfan.nix
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.services.matrix-dendrite;
|
cfg = config.services.dendrite;
|
||||||
settingsFormat = pkgs.formats.yaml { };
|
settingsFormat = pkgs.formats.yaml { };
|
||||||
configurationYaml = settingsFormat.generate "dendrite.yaml" cfg.settings;
|
configurationYaml = settingsFormat.generate "dendrite.yaml" cfg.settings;
|
||||||
workingDir = "/var/lib/matrix-dendrite";
|
workingDir = "/var/lib/dendrite";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.services.matrix-dendrite = {
|
options.services.dendrite = {
|
||||||
enable = lib.mkEnableOption "matrix.org dendrite";
|
enable = lib.mkEnableOption "matrix.org dendrite";
|
||||||
httpPort = lib.mkOption {
|
httpPort = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.port;
|
type = lib.types.nullOr lib.types.port;
|
||||||
@ -24,31 +24,31 @@ in
|
|||||||
};
|
};
|
||||||
tlsCert = lib.mkOption {
|
tlsCert = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.path;
|
type = lib.types.nullOr lib.types.path;
|
||||||
example = "/var/lib/matrix-dendrite/server.cert";
|
example = "/var/lib/dendrite/server.cert";
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
The path to the TLS certificate.
|
The path to the TLS certificate.
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
nix-shell -p matrix-dendrite --command "generate-keys --tls-cert server.crt --tls-key server.key"
|
nix-shell -p dendrite --command "generate-keys --tls-cert server.crt --tls-key server.key"
|
||||||
</programlisting>
|
</programlisting>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
tlsKey = lib.mkOption {
|
tlsKey = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.path;
|
type = lib.types.nullOr lib.types.path;
|
||||||
example = "/var/lib/matrix-dendrite/server.key";
|
example = "/var/lib/dendrite/server.key";
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
The path to the TLS key.
|
The path to the TLS key.
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
nix-shell -p matrix-dendrite --command "generate-keys --tls-cert server.crt --tls-key server.key"
|
nix-shell -p dendrite --command "generate-keys --tls-cert server.crt --tls-key server.key"
|
||||||
</programlisting>
|
</programlisting>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
environmentFile = lib.mkOption {
|
environmentFile = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.path;
|
type = lib.types.nullOr lib.types.path;
|
||||||
example = "/var/lib/matrix-dendrite/registration_secret";
|
example = "/var/lib/dendrite/registration_secret";
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Environment file as defined in <citerefentry>
|
Environment file as defined in <citerefentry>
|
||||||
@ -62,7 +62,7 @@ in
|
|||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
# snippet of dendrite-related config
|
# 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>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
@ -95,7 +95,7 @@ in
|
|||||||
requests and events.
|
requests and events.
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
nix-shell -p matrix-dendrite --command "generate-keys --private-key matrix_key.pem"
|
nix-shell -p dendrite --command "generate-keys --private-key matrix_key.pem"
|
||||||
</programlisting>
|
</programlisting>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@ -136,11 +136,11 @@ in
|
|||||||
message = ''
|
message = ''
|
||||||
If Dendrite is configured to use https, tlsCert and tlsKey must be provided.
|
If Dendrite is configured to use https, tlsCert and tlsKey must be provided.
|
||||||
|
|
||||||
nix-shell -p matrix-dendrite --command "generate-keys --tls-cert server.crt --tls-key server.key"
|
nix-shell -p dendrite --command "generate-keys --tls-cert server.crt --tls-key server.key"
|
||||||
'';
|
'';
|
||||||
}];
|
}];
|
||||||
|
|
||||||
systemd.services.matrix-dendrite = {
|
systemd.services.dendrite = {
|
||||||
description = "Dendrite Matrix homeserver";
|
description = "Dendrite Matrix homeserver";
|
||||||
after = [
|
after = [
|
||||||
"network.target"
|
"network.target"
|
||||||
@ -149,22 +149,22 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
StateDirectory = "matrix-dendrite";
|
StateDirectory = "dendrite";
|
||||||
WorkingDirectory = workingDir;
|
WorkingDirectory = workingDir;
|
||||||
RuntimeDirectory = "matrix-dendrite";
|
RuntimeDirectory = "dendrite";
|
||||||
RuntimeDirectoryMode = "0700";
|
RuntimeDirectoryMode = "0700";
|
||||||
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
||||||
ExecStartPre =
|
ExecStartPre =
|
||||||
if (cfg.environmentFile != null) then ''
|
if (cfg.environmentFile != null) then ''
|
||||||
${pkgs.envsubst}/bin/envsubst \
|
${pkgs.envsubst}/bin/envsubst \
|
||||||
-i ${configurationYaml} \
|
-i ${configurationYaml} \
|
||||||
-o /run/matrix-dendrite/dendrite.yaml
|
-o /run/dendrite/dendrite.yaml
|
||||||
'' else ''
|
'' else ''
|
||||||
${pkgs.coreutils}/bin/cp ${configurationYaml} /run/matrix-dendrite/dendrite.yaml
|
${pkgs.coreutils}/bin/cp ${configurationYaml} /run/dendrite/dendrite.yaml
|
||||||
'';
|
'';
|
||||||
ExecStart = lib.strings.concatStringsSep " " ([
|
ExecStart = lib.strings.concatStringsSep " " ([
|
||||||
"${pkgs.matrix-dendrite}/bin/dendrite-monolith-server"
|
"${pkgs.dendrite}/bin/dendrite-monolith-server"
|
||||||
"--config /run/matrix-dendrite/dendrite.yaml"
|
"--config /run/dendrite/dendrite.yaml"
|
||||||
] ++ lib.optionals (cfg.httpPort != null) [
|
] ++ lib.optionals (cfg.httpPort != null) [
|
||||||
"--http-bind-address :${builtins.toString cfg.httpPort}"
|
"--http-bind-address :${builtins.toString cfg.httpPort}"
|
||||||
] ++ lib.optionals (cfg.httpsPort != null) [
|
] ++ lib.optionals (cfg.httpsPort != null) [
|
@ -6130,8 +6130,6 @@ in
|
|||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
inherit (darwin.apple_sdk.frameworks) Security;
|
||||||
};
|
};
|
||||||
|
|
||||||
matrix-dendrite = callPackage ../servers/matrix-dendrite { };
|
|
||||||
|
|
||||||
/* Python 3.8 is currently broken with matrix-synapse since `python38Packages.bleach` fails
|
/* Python 3.8 is currently broken with matrix-synapse since `python38Packages.bleach` fails
|
||||||
(https://github.com/NixOS/nixpkgs/issues/76093) */
|
(https://github.com/NixOS/nixpkgs/issues/76093) */
|
||||||
matrix-synapse = callPackage ../servers/matrix-synapse { /*python3 = python38;*/ };
|
matrix-synapse = callPackage ../servers/matrix-synapse { /*python3 = python38;*/ };
|
||||||
@ -18648,6 +18646,8 @@ in
|
|||||||
|
|
||||||
couchpotato = callPackage ../servers/couchpotato {};
|
couchpotato = callPackage ../servers/couchpotato {};
|
||||||
|
|
||||||
|
dendrite = callPackage ../servers/dendrite { };
|
||||||
|
|
||||||
dex-oidc = callPackage ../servers/dex { };
|
dex-oidc = callPackage ../servers/dex { };
|
||||||
|
|
||||||
dex2jar = callPackage ../development/tools/java/dex2jar { };
|
dex2jar = callPackage ../development/tools/java/dex2jar { };
|
||||||
|
Loading…
Reference in New Issue
Block a user