mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
Merge pull request #249150 from Ma27/tempo-extraflags
nixos/tempo: add `extraFlags` option
This commit is contained in:
commit
25c37880ec
@ -27,6 +27,18 @@ in {
|
||||
Specify a path to a configuration file that Tempo should use.
|
||||
'';
|
||||
};
|
||||
|
||||
extraFlags = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = lib.literalExpression
|
||||
''
|
||||
[ "-config.expand-env=true" ]
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
Additional flags to pass to the `ExecStart=` in `tempo.service`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
@ -54,7 +66,7 @@ in {
|
||||
else cfg.configFile;
|
||||
in
|
||||
{
|
||||
ExecStart = "${pkgs.tempo}/bin/tempo --config.file=${conf}";
|
||||
ExecStart = "${pkgs.tempo}/bin/tempo --config.file=${conf} ${lib.escapeShellArgs cfg.extraFlags}";
|
||||
DynamicUser = true;
|
||||
Restart = "always";
|
||||
ProtectSystem = "full";
|
||||
|
Loading…
Reference in New Issue
Block a user