diff --git a/hosts/physiques/cephiroth/default.nix b/hosts/physiques/cephiroth/default.nix index 02d4b2f..e5b0055 100644 --- a/hosts/physiques/cephiroth/default.nix +++ b/hosts/physiques/cephiroth/default.nix @@ -3,6 +3,7 @@ { imports = [ ./hardware-configuration.nix + ./networking.nix ]; networking.hostId = "121cdcb4"; @@ -29,25 +30,10 @@ networking = { id = 3; - adm = { - enable = true; - interface = "bond0"; - }; - srvNat = { - enable = true; - interface = "bond0"; - }; }; resticClient.enable = false; }; - networking = { - bonds.bond0 = { - interfaces = [ "enp11s0f0" "enp11s0f1" ]; - driverOptions.mode = "802.3ad"; - }; - }; - system.stateVersion = "24.05"; } diff --git a/hosts/physiques/cephiroth/networking.nix b/hosts/physiques/cephiroth/networking.nix new file mode 100644 index 0000000..c1b540b --- /dev/null +++ b/hosts/physiques/cephiroth/networking.nix @@ -0,0 +1,49 @@ +{ ... }: + +{ + networking = { + + dhcpcd.enable = false; + + vlans = { + srv-nat = { + id = 3; + interface = "bond0"; + }; + adm = { + id = 10; + interface = "bond0"; + }; + }; + + bonds.bond0 = { + interfaces = [ "enp11s0f0" "enp11s0f1" ]; + driverOptions.mode = "802.3ad"; + }; + + interfaces = { + srv-nat = { + ipv4 = { + addresses = [ + { + address = "172.16.3.3"; + prefixLength = 24; + } + ]; + }; + }; + adm = { + ipv4 = { + addresses = [ + { + address = "172.16.10.3"; + prefixLength = 24; + } + ]; + }; + }; + }; + defaultGateway = "172.16.3.99"; + nameservers = [ "172.16.10.128" ]; + }; +}