From 0bbed1c273e4bbb71e438768f532464db7d7a4c5 Mon Sep 17 00:00:00 2001 From: Phillip Cloud Date: Sat, 23 Jan 2021 12:43:43 -0500 Subject: [PATCH 1/2] nixos/nomad: add newline --- nixos/modules/services/networking/nomad.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/networking/nomad.nix b/nixos/modules/services/networking/nomad.nix index e6bbb607aaa..a0520d4c998 100644 --- a/nixos/modules/services/networking/nomad.nix +++ b/nixos/modules/services/networking/nomad.nix @@ -114,6 +114,7 @@ in } // (optionalAttrs cfg.enableDocker { SupplementaryGroups = "docker"; # space-separated string }); + unitConfig = { StartLimitIntervalSec = 10; StartLimitBurst = 3; From 2861d26df5e9aeb5bc385b921a1aaac46011708e Mon Sep 17 00:00:00 2001 From: Phillip Cloud Date: Sat, 23 Jan 2021 12:44:23 -0500 Subject: [PATCH 2/2] 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 ];