configuration.nix/hosts/wynne/services/apps/dendrite/default.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2024-11-16 19:00:13 +05:30
{ pkgs, ... }:
2024-09-14 19:55:57 +05:30
{
systemd.services.dendrite =
let
dendrite_package = pkgs.dendrite;
in
{
description = "Dendrite Matrix homeserver";
2024-11-23 00:22:19 +05:30
after = [ "network.target" "wg-quick-Homelab.service" "postgresql.service" ];
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 = ''
${dendrite_package}/bin/dendrite -http-bind-address 10.10.10.13:8008 -config ${./config.yaml}
'';
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 = { };
}