From 2861d26df5e9aeb5bc385b921a1aaac46011708e Mon Sep 17 00:00:00 2001 From: Phillip Cloud Date: Sat, 23 Jan 2021 12:44:23 -0500 Subject: [PATCH] nixos/nomad: move data_dir default setting to allow propagation of default --- nixos/modules/services/networking/nomad.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/networking/nomad.nix b/nixos/modules/services/networking/nomad.nix index a0520d4c998..6c151175e5b 100644 --- a/nixos/modules/services/networking/nomad.nix +++ b/nixos/modules/services/networking/nomad.nix @@ -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 documentation 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 ];