git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/nomad: move data_dir default setting to allow propagation of default
commit2861d26df5e9aeb5bc385b921a1aaac46011708e authorPhillip Cloud <cloud@standard.ai> dateSat 23 Jan 2021, 12:44 (6 years ago) parent0bbed1c
1 file changed+6−4
nixos/modules/services/networking/nomad.nix+6−4
nixos/modules/services/networking/nomad.nix+6−4
@@ -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 ];