nixos/nomad: move data_dir default setting to allow propagation of default

This commit is contained in:
Phillip Cloud 2021-01-23 12:44:23 -05:00
parent 0bbed1c273
commit 2861d26df5

View file

@ -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 ];