2024-11-16 19:00:13 +05:30
|
|
|
{ pkgs, ... }:
|
2024-09-14 19:55:57 +05:30
|
|
|
{
|
2024-09-17 22:44:04 +05:30
|
|
|
systemd.services.dendrite =
|
|
|
|
let
|
2024-10-25 22:57:34 +05:30
|
|
|
dendrite_package = pkgs.dendrite;
|
2024-09-17 22:44:04 +05:30
|
|
|
in
|
|
|
|
{
|
|
|
|
description = "Dendrite Matrix homeserver";
|
|
|
|
after = [ "network.target" ];
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
unitConfig.RequiresMountsFor = [ "/mnt/data" ];
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "simple";
|
|
|
|
User = "dendrite";
|
|
|
|
Group = "dendrite";
|
|
|
|
StateDirectory = "dendrite";
|
|
|
|
WorkingDirectory = "/mnt/data/dendrite";
|
|
|
|
RuntimeDirectory = "dendrite";
|
|
|
|
RuntimeDirectoryMode = "0700";
|
|
|
|
LimitNOFILE = 65535;
|
|
|
|
ExecStart = ''
|
2024-10-28 23:52:16 +05:30
|
|
|
${dendrite_package}/bin/dendrite -http-bind-address 10.10.10.13:8008 -config ${./config.yaml}
|
2024-09-17 22:44:04 +05:30
|
|
|
'';
|
|
|
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
|
|
|
Restart = "on-failure";
|
|
|
|
};
|
2024-07-20 23:16:33 +05:30
|
|
|
};
|
|
|
|
users.users.dendrite = {
|
|
|
|
name = "dendrite";
|
|
|
|
description = "Dendrite server user";
|
|
|
|
home = "/mnt/data/dendrite";
|
|
|
|
createHome = true;
|
|
|
|
group = "dendrite";
|
|
|
|
isSystemUser = true;
|
|
|
|
};
|
|
|
|
users.groups.dendrite = { };
|
|
|
|
}
|