nixos/nomad: add mkIf for StateDirectory
This commit is contained in:
parent
58fe45936e
commit
b80c454459
@ -135,12 +135,11 @@ in
|
|||||||
OOMScoreAdjust = -1000;
|
OOMScoreAdjust = -1000;
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 2;
|
RestartSec = 2;
|
||||||
# Agrees with the default `data_dir = "/var/lib/nomad"` in `settings` above.
|
|
||||||
StateDirectory = "nomad";
|
|
||||||
TasksMax = "infinity";
|
TasksMax = "infinity";
|
||||||
User = optionalString cfg.dropPrivileges "nomad";
|
User = optionalString cfg.dropPrivileges "nomad";
|
||||||
}
|
}
|
||||||
(mkIf cfg.enableDocker { SupplementaryGroups = "docker"; }) # space-separated string
|
(mkIf cfg.enableDocker { SupplementaryGroups = "docker"; }) # space-separated string
|
||||||
|
(mkIf (cfg.settings.data_dir == "/var/lib/nomad") { StateDirectory = "nomad"; })
|
||||||
];
|
];
|
||||||
|
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user