Merge pull request #110614 from cpcloud/nomad-mkdefault-data-dir
nixos/nomad: fix data_dir-default-not-propagating bug
This commit is contained in:
commit
e03103707b
@ -51,10 +51,7 @@ in
|
||||
|
||||
settings = mkOption {
|
||||
type = format.type;
|
||||
default = {
|
||||
# Agrees with `StateDirectory = "nomad"` set below.
|
||||
data_dir = "/var/lib/nomad";
|
||||
};
|
||||
default = {};
|
||||
description = ''
|
||||
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
|
||||
for supported values.
|
||||
@ -77,6 +74,11 @@ in
|
||||
|
||||
##### implementation
|
||||
config = mkIf cfg.enable {
|
||||
services.nomad.settings = {
|
||||
# Agrees with `StateDirectory = "nomad"` set below.
|
||||
data_dir = mkDefault "/var/lib/nomad";
|
||||
};
|
||||
|
||||
environment = {
|
||||
etc."nomad.json".source = format.generate "nomad.json" cfg.settings;
|
||||
systemPackages = [ cfg.package ];
|
||||
@ -114,6 +116,7 @@ in
|
||||
} // (optionalAttrs cfg.enableDocker {
|
||||
SupplementaryGroups = "docker"; # space-separated string
|
||||
});
|
||||
|
||||
unitConfig = {
|
||||
StartLimitIntervalSec = 10;
|
||||
StartLimitBurst = 3;
|
||||
|
Loading…
Reference in New Issue
Block a user