@@ -51,10 +51,7 @@ in
5151
5252 settings = mkOption {
5353 type = format.type;
54− default = {
55− # Agrees with `StateDirectory = "nomad"` set below.
56− data_dir = "/var/lib/nomad";
57− };
54+ default = {};
5855 description = ''
5956 Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
6057 for supported values.
@@ -77,6 +74,11 @@ in
7774
7875 ##### implementation
7976 config = mkIf cfg.enable {
77+ services.nomad.settings = {
78+ # Agrees with `StateDirectory = "nomad"` set below.
79+ data_dir = mkDefault "/var/lib/nomad";
80+ };
81+
8082 environment = {
8183 etc."nomad.json".source = format.generate "nomad.json" cfg.settings;
8284 systemPackages = [ cfg.package ];