mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-06 21:42:35 +03:00
nixos/mimir: add extraFlags option
This commit is contained in:
parent
ca6ed1cc8d
commit
6e8591a8d1
@ -32,11 +32,21 @@ in {
|
|||||||
type = types.package;
|
type = types.package;
|
||||||
description = lib.mdDoc ''Mimir package to use.'';
|
description = lib.mdDoc ''Mimir package to use.'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraFlags = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [];
|
||||||
|
example = [ "--config.expand-env=true" ];
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Specify a list of additional command line flags,
|
||||||
|
which get escaped and are then passed to Mimir.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# for mimirtool
|
# for mimirtool
|
||||||
environment.systemPackages = [ pkgs.mimir ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
assertions = [{
|
assertions = [{
|
||||||
assertion = (
|
assertion = (
|
||||||
@ -60,7 +70,7 @@ in {
|
|||||||
else cfg.configFile;
|
else cfg.configFile;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
ExecStart = "${cfg.package}/bin/mimir --config.file=${conf}";
|
ExecStart = "${cfg.package}/bin/mimir --config.file=${conf} ${escapeShellArgs cfg.extraFlags}";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
ProtectSystem = "full";
|
ProtectSystem = "full";
|
||||||
|
Loading…
Reference in New Issue
Block a user