nixos/nomad: add extraSettingsFiles option to nomad service (#109761)
This commit is contained in:
@@ -49,6 +49,17 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
extraSettingsPaths = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [];
|
||||
description = ''
|
||||
Additional settings paths used to configure nomad. These can be files or directories.
|
||||
'';
|
||||
example = literalExample ''
|
||||
[ "/etc/nomad-mutable.json" "/run/keys/nomad-with-secrets.json" "/etc/nomad/config.d" ]
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = format.type;
|
||||
default = {};
|
||||
@@ -101,7 +112,8 @@ in
|
||||
serviceConfig = {
|
||||
DynamicUser = cfg.dropPrivileges;
|
||||
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;
|
||||
KillMode = "process";
|
||||
KillSignal = "SIGINT";
|
||||
LimitNOFILE = 65536;
|
||||
|
||||
Reference in New Issue
Block a user