From 505acdc5ccfe29cf6cb136dfaaa77ed4bac0bd15 Mon Sep 17 00:00:00 2001 From: Steffen Illium Date: Sat, 24 Jan 2026 18:54:13 +0100 Subject: [PATCH] bind network interfaces --- bond-network.nix | 18 ++++++++++++++++++ configuration.nix | 1 - network.nix => gbs-network.nix | 0 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 bond-network.nix rename network.nix => gbs-network.nix (100%) diff --git a/bond-network.nix b/bond-network.nix new file mode 100644 index 0000000..b81c2b6 --- /dev/null +++ b/bond-network.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: { + boot.kernelModules = [ "bonding" ]; + + networking.bonds.bond0 = { + interfaces = [ "enp1s0" "enp2s0" ]; + driverOptions = { + mode = "802.3ad"; + miimon = "100"; + lacp_rate = "fast"; + xmit_hash_policy = "layer3+4"; + }; + }; + + networking.interfaces.enp1s0.useDHCP = false; + networking.interfaces.enp2s0.useDHCP = false; + networking.interfaces.bond0.useDHCP = true; +} + diff --git a/configuration.nix b/configuration.nix index e4b13f4..70474a9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,7 +4,6 @@ imports = [ # Include the results of the hardware scan... ./hardware-configuration.nix - ./network.nix # ...and additional configurations... ./var_reg.nix diff --git a/network.nix b/gbs-network.nix similarity index 100% rename from network.nix rename to gbs-network.nix