aboutsummaryrefslogtreecommitdiff
path: root/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'configuration.nix')
-rw-r--r--configuration.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/configuration.nix b/configuration.nix
index a73a6eb..e2fbe3b 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -217,24 +217,26 @@ in
services.consul.extraConfig =
let public_ip = (builtins.head (builtins.split "/" (builtins.head node_config.networking.wireguard.interfaces.wg0.ips)));
in
+ (if node_config.services.consul.extraConfig.server or false
+ then { bootstrap_expect = 3; }
+ else {}) //
{
- server = true;
+ datacenter = "staging";
ui = true;
bind_addr = public_ip;
addresses.http = "0.0.0.0";
retry_join = [ "10.42.0.2" "10.42.0.21" "10.42.0.22" "10.42.0.23" ];
- retry_join_wan = [ "10.42.0.2" "10.42.0.21" "10.42.0.22" "10.42.0.23" ];
};
services.nomad.enable = true;
services.nomad.settings =
let public_ip = (builtins.head (builtins.split "/" (builtins.head node_config.networking.wireguard.interfaces.wg0.ips)));
in
+ (if node_config.services.nomad.settings.server.enabled or false
+ then { server = { bootstrap_expect = 3; }; }
+ else {}) //
{
- region = site_config.services.nomad.settings.datacenter;
- server = {
- enabled = true;
- };
+ region = "staging";
advertise = {
rpc = public_ip;
http = public_ip;