modules/matrix-alertmanager-receiver: Try to fix pkg

This commit is contained in:
fleaz 2024-07-09 23:53:59 +02:00
parent 7896ac5c42
commit 0568e2990b
No known key found for this signature in database
GPG key ID: AED15F8FDD04D083

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ...}:
{ config, lib, pkgs, ... }:
let
cfg = config.services.matrix-alertmanager-receiver;
in
@ -6,6 +6,8 @@ in
options.services.matrix-alertmanager-receiver = {
enable = lib.mkEnableOption "matrix-alertmanager-receiver, a Matrix bridge for Alertmanager webhooks";
package = lib.mkPackageOption pkgs "matrix-alertmanager-receiver" { };
configFile = lib.mkOption {
type = lib.types.path;
default = "";
@ -30,7 +32,7 @@ in
serviceConfig = {
DynamicUser = true;
User = "matrix-alertmanager-receiver";
ExecStart = "${pkgs.matrix-alertmanager-receiver}/bin/matrix-alertmanager-receiver -config ${cfg.configFile}";
ExecStart = "${cfg.package}/bin/matrix-alertmanager-receiver -config ${cfg.configFile}";
};
};
};