nixos/nomad: only set User if privileges are dropped
This commit is contained in:
parent
de71f5b506
commit
2a3cb407b0
|
@ -137,7 +137,7 @@ in
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 2;
|
RestartSec = 2;
|
||||||
TasksMax = "infinity";
|
TasksMax = "infinity";
|
||||||
User = "nomad";
|
User = optionalString cfg.dropPrivileges "nomad";
|
||||||
}
|
}
|
||||||
(mkIf cfg.enableDocker {
|
(mkIf cfg.enableDocker {
|
||||||
SupplementaryGroups = "docker"; # space-separated string
|
SupplementaryGroups = "docker"; # space-separated string
|
||||||
|
|
Loading…
Reference in a new issue