Set correct interface name for beefy.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
# Cluster node configuration
|
||||
# Extends minimal-node with cluster-specific services (Consul, GlusterFS, CIFS, NFS)
|
||||
@@ -11,7 +11,14 @@
|
||||
./nfs-services-client.nix # New: NFS client for /data/services
|
||||
];
|
||||
|
||||
# Wait for eno1 to be routable before considering network online
|
||||
# (hosts with different primary interfaces should override this)
|
||||
systemd.network.wait-online.extraArgs = [ "--interface=eno1:routable" ];
|
||||
options.networking.cluster.primaryInterface = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "eno1";
|
||||
description = "Primary network interface for cluster communication (Consul, NFS, etc.)";
|
||||
};
|
||||
|
||||
config = {
|
||||
# Wait for primary interface to be routable before considering network online
|
||||
systemd.network.wait-online.extraArgs = [ "--interface=${config.networking.cluster.primaryInterface}:routable" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ in
|
||||
services.consul = {
|
||||
enable = true;
|
||||
webUi = true;
|
||||
interface.advertise = "eno1";
|
||||
interface.advertise = config.networking.cluster.primaryInterface;
|
||||
extraConfig = {
|
||||
client_addr = "0.0.0.0";
|
||||
datacenter = "alo";
|
||||
|
||||
Reference in New Issue
Block a user