diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2022-07-18 20:56:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-18 20:56:08 +0200 |
commit | 0640ef2ccc3bcefbc256d31e9ea53f5ff3f4f60e (patch) | |
tree | 931373cab375abcdcb70e2d60b148b5992b3bf8d /nixos/modules/services/logging | |
parent | fc9e22fca12e71f5a43ab616aa0e669392174e12 (diff) | |
parent | 49a5377557a8c3695b96e5cece1db315c72ddc86 (diff) |
Merge pull request #180231 from dfithian/heartbeat
heartbeat service: specify package
Diffstat (limited to 'nixos/modules/services/logging')
-rw-r--r-- | nixos/modules/services/logging/heartbeat.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/services/logging/heartbeat.nix b/nixos/modules/services/logging/heartbeat.nix index 56fb4deabda52..843ec033911f1 100644 --- a/nixos/modules/services/logging/heartbeat.nix +++ b/nixos/modules/services/logging/heartbeat.nix @@ -20,6 +20,16 @@ in enable = mkEnableOption "heartbeat"; + package = mkOption { + type = types.package; + default = pkgs.heartbeat; + defaultText = literalExpression "pkgs.heartbeat"; + example = literalExpression "pkgs.heartbeat7"; + description = '' + The heartbeat package to use. + ''; + }; + name = mkOption { type = types.str; default = "heartbeat"; @@ -67,7 +77,7 @@ in serviceConfig = { User = "nobody"; AmbientCapabilities = "cap_net_raw"; - ExecStart = "${pkgs.heartbeat}/bin/heartbeat -c \"${heartbeatYml}\" -path.data \"${cfg.stateDir}/data\" -path.logs \"${cfg.stateDir}/logs\""; + ExecStart = "${cfg.package}/bin/heartbeat -c \"${heartbeatYml}\" -path.data \"${cfg.stateDir}/data\" -path.logs \"${cfg.stateDir}/logs\""; }; }; }; |