aboutsummaryrefslogtreecommitdiff
path: root/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'configuration.nix')
-rw-r--r--configuration.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/configuration.nix b/configuration.nix
index be424f8..b55c15e 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -6,6 +6,7 @@
# Configuration local for this cluster node (hostname, IP, etc)
let node_config = import ./node.nix args;
+ site_config = import ./site.nix args;
in
{
imports =
@@ -13,6 +14,8 @@ in
./hardware-configuration.nix
# Configuration local for this cluster node (hostname, IP, etc)
./node.nix
+ # Configuration local for this Deuxfleurs site (set of nodes)
+ ./site.nix
];
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
@@ -210,11 +213,9 @@ in
# Enable Hashicorp Consul & Nomad
services.consul.enable = true;
services.consul.extraConfig =
- let public_ip = (builtins.head node_config.networking.wireguard.interfaces.wg0.ips);
+ let public_ip = (builtins.head (builtins.split "/" (builtins.head node_config.networking.wireguard.interfaces.wg0.ips)));
in
{
- datacenter = "neptune";
- bootstrap_expect = 3;
server = true;
ui = true;
bind_addr = public_ip;
@@ -224,13 +225,12 @@ in
services.nomad.enable = true;
services.nomad.settings =
- let public_ip = (builtins.head node_config.networking.wireguard.interfaces.wg0.ips);
+ let public_ip = (builtins.head (builtins.split "/" (builtins.head node_config.networking.wireguard.interfaces.wg0.ips)));
in
{
- datacenter = "neptune";
+ region = site_config.services.nomad.settings.datacenter;
server = {
enabled = true;
- bootstrap_expect = 3;
};
advertise = {
rpc = public_ip;
@@ -240,7 +240,7 @@ in
consul.address = "127.0.0.1:8500";
client = {
enabled = true;
- network_interface = "eno1";
+ network_interface = "wg0";
};
plugin = [
{