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 let
cfg = config.services.matrix-alertmanager-receiver; cfg = config.services.matrix-alertmanager-receiver;
in in
@ -6,6 +6,8 @@ in
options.services.matrix-alertmanager-receiver = { options.services.matrix-alertmanager-receiver = {
enable = lib.mkEnableOption "matrix-alertmanager-receiver, a Matrix bridge for Alertmanager webhooks"; enable = lib.mkEnableOption "matrix-alertmanager-receiver, a Matrix bridge for Alertmanager webhooks";
package = lib.mkPackageOption pkgs "matrix-alertmanager-receiver" { };
configFile = lib.mkOption { configFile = lib.mkOption {
type = lib.types.path; type = lib.types.path;
default = ""; default = "";
@ -30,7 +32,7 @@ in
serviceConfig = { serviceConfig = {
DynamicUser = true; DynamicUser = true;
User = "matrix-alertmanager-receiver"; 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}";
}; };
}; };
}; };