wynne: dendrite - override dendrite version

untill https://github.com/NixOS/nixpkgs/pull/341922 is merged
This commit is contained in:
Adithya 2024-09-17 22:44:04 +05:30
parent 382e7efa4b
commit 31eb4ce2d5
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C

View file

@ -50,27 +50,40 @@ in
environmentFile = config.sops.secrets."matrix/syncv3_secret".path; environmentFile = config.sops.secrets."matrix/syncv3_secret".path;
}; };
}; };
systemd.services.dendrite = { systemd.services.dendrite =
description = "Dendrite Matrix homeserver"; let
after = [ "network.target" ]; dendrite_package = pkgs.dendrite.overrideAttrs rec {
wantedBy = [ "multi-user.target" ]; version = "0.13.8";
unitConfig.RequiresMountsFor = [ "/mnt/data" ]; src = pkgs.fetchFromGitHub {
serviceConfig = { owner = "matrix-org";
Type = "simple"; repo = "dendrite";
User = "dendrite"; rev = "v${version}";
Group = "dendrite"; hash = "sha256-zUpZdG2cdZ95L70qLG2HaUlD+G66XTi4f1V4+ZZAh30=";
StateDirectory = "dendrite"; };
WorkingDirectory = "/mnt/data/dendrite"; vendorHash = "sha256-rGOB1ikY3BgChvD1YZUF66g8P6gE29b/k9kxvHR0+WQ=";
RuntimeDirectory = "dendrite"; };
RuntimeDirectoryMode = "0700"; in
LimitNOFILE = 65535; {
ExecStart = '' description = "Dendrite Matrix homeserver";
${pkgs.dendrite}/bin/dendrite -http-bind-address 127.0.0.1:8008 -config ${./config.yaml} after = [ "network.target" ];
''; wantedBy = [ "multi-user.target" ];
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; unitConfig.RequiresMountsFor = [ "/mnt/data" ];
Restart = "on-failure"; 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 127.0.0.1:8008 -config ${./config.yaml}
'';
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Restart = "on-failure";
};
}; };
};
users.users.dendrite = { users.users.dendrite = {
name = "dendrite"; name = "dendrite";
description = "Dendrite server user"; description = "Dendrite server user";