mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
nixos/nomad: move data_dir default setting to allow propagation of default
This commit is contained in:
parent
0bbed1c273
commit
2861d26df5
1 changed files with 6 additions and 4 deletions
|
@ -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 ];
|
||||
|
|
Loading…
Reference in a new issue