nixos/nomad: move data_dir default setting to allow propagation of default
This commit is contained in:
parent
0bbed1c273
commit
2861d26df5
|
@ -51,10 +51,7 @@ in
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = format.type;
|
type = format.type;
|
||||||
default = {
|
default = {};
|
||||||
# Agrees with `StateDirectory = "nomad"` set below.
|
|
||||||
data_dir = "/var/lib/nomad";
|
|
||||||
};
|
|
||||||
description = ''
|
description = ''
|
||||||
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
|
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
|
||||||
for supported values.
|
for supported values.
|
||||||
|
@ -77,6 +74,11 @@ in
|
||||||
|
|
||||||
##### implementation
|
##### implementation
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
services.nomad.settings = {
|
||||||
|
# Agrees with `StateDirectory = "nomad"` set below.
|
||||||
|
data_dir = mkDefault "/var/lib/nomad";
|
||||||
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
etc."nomad.json".source = format.generate "nomad.json" cfg.settings;
|
etc."nomad.json".source = format.generate "nomad.json" cfg.settings;
|
||||||
systemPackages = [ cfg.package ];
|
systemPackages = [ cfg.package ];
|
||||||
|
|
Loading…
Reference in a new issue