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