forked from mirrors/nixpkgs
nixos/nomad: add flag of plugin-dir
This commit is contained in:
parent
d5321ca4ad
commit
6a1fdd60e6
|
@ -51,7 +51,7 @@ in
|
||||||
|
|
||||||
extraSettingsPaths = mkOption {
|
extraSettingsPaths = mkOption {
|
||||||
type = types.listOf types.path;
|
type = types.listOf types.path;
|
||||||
default = [];
|
default = [ ];
|
||||||
description = ''
|
description = ''
|
||||||
Additional settings paths used to configure nomad. These can be files or directories.
|
Additional settings paths used to configure nomad. These can be files or directories.
|
||||||
'';
|
'';
|
||||||
|
@ -60,9 +60,21 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraSettingsPlugins = mkOption {
|
||||||
|
type = types.listOf (types.either types.package types.path);
|
||||||
|
default = [ ];
|
||||||
|
description = ''
|
||||||
|
Additional plugins dir used to configure nomad.
|
||||||
|
'';
|
||||||
|
example = literalExpression ''
|
||||||
|
[ "<pluginDir>" "pkgs.<plugins-name>"]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = format.type;
|
type = format.type;
|
||||||
default = {};
|
default = { };
|
||||||
description = ''
|
description = ''
|
||||||
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
|
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
|
||||||
for supported values.
|
for supported values.
|
||||||
|
@ -128,7 +140,8 @@ in
|
||||||
DynamicUser = cfg.dropPrivileges;
|
DynamicUser = cfg.dropPrivileges;
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json" +
|
ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json" +
|
||||||
concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths;
|
concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths +
|
||||||
|
concatMapStrings (path: " -plugin-dir=${path}/bin") cfg.extraSettingsPlugins;
|
||||||
KillMode = "process";
|
KillMode = "process";
|
||||||
KillSignal = "SIGINT";
|
KillSignal = "SIGINT";
|
||||||
LimitNOFILE = 65536;
|
LimitNOFILE = 65536;
|
||||||
|
|
Loading…
Reference in a new issue