diff options
author | Phillip Cloud <cloud@standard.ai> | 2021-01-18 09:07:09 -0500 |
---|---|---|
committer | Phillip Cloud <cloud@standard.ai> | 2021-01-23 19:44:37 -0500 |
commit | b80c4544592fe8cf665c4e76b91f912c50877c51 (patch) | |
tree | 378db15ccfe0f9cc4819e13534425b3260ad81e8 /nixos | |
parent | 58fe45936e89afef1e3ac35f80d07eb6b0a7ab20 (diff) |
nixos/nomad: add mkIf for StateDirectory
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/nomad.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/nomad.nix b/nixos/modules/services/networking/nomad.nix index 10fe63f8425a..0845b4f97b88 100644 --- a/nixos/modules/services/networking/nomad.nix +++ b/nixos/modules/services/networking/nomad.nix @@ -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 = { |