From 270b461b9717c469ffd305ce5c76869252436ee1 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Wed, 10 Feb 2021 23:38:05 +0000 Subject: [PATCH] ops/nixos: create br-ext and put everything on it --- ops/nixos/blade-chakotay/default.nix | 2 +- ops/nixos/blade-janeway/default.nix | 2 +- ops/nixos/blade-kim/default.nix | 2 +- ops/nixos/blade-paris/default.nix | 2 +- ops/nixos/blade-torres/default.nix | 2 +- ops/nixos/blade-tuvok/default.nix | 2 +- ops/nixos/lib/blade.nix | 9 +++++++++ 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ops/nixos/blade-chakotay/default.nix b/ops/nixos/blade-chakotay/default.nix index e50063f5a6..46b3522639 100644 --- a/ops/nixos/blade-chakotay/default.nix +++ b/ops/nixos/blade-chakotay/default.nix @@ -16,7 +16,7 @@ in { networking = { hostName = "blade-chakotay"; hostId = "40bc5a75"; - interfaces.bond0.ipv4.addresses = [{ + interfaces.br-ext.ipv4.addresses = [{ address = "192.168.1.182"; prefixLength = 24; }]; diff --git a/ops/nixos/blade-janeway/default.nix b/ops/nixos/blade-janeway/default.nix index 1a4618c38c..3dea69ce36 100644 --- a/ops/nixos/blade-janeway/default.nix +++ b/ops/nixos/blade-janeway/default.nix @@ -20,7 +20,7 @@ in { "enp4s0f0" "enp4s0f1" "enp5s0f0" "enp5s0f1" ]; - interfaces.bond0.ipv4.addresses = [{ + interfaces.br-ext.ipv4.addresses = [{ address = "192.168.1.180"; prefixLength = 24; }]; diff --git a/ops/nixos/blade-kim/default.nix b/ops/nixos/blade-kim/default.nix index efca70459a..fa29ec8c40 100644 --- a/ops/nixos/blade-kim/default.nix +++ b/ops/nixos/blade-kim/default.nix @@ -16,7 +16,7 @@ in { networking = { hostName = "blade-kim"; hostId = "1643efb6"; - interfaces.bond0.ipv4.addresses = [{ + interfaces.br-ext.ipv4.addresses = [{ address = "192.168.1.183"; prefixLength = 24; }]; diff --git a/ops/nixos/blade-paris/default.nix b/ops/nixos/blade-paris/default.nix index 6378119939..223da918ef 100644 --- a/ops/nixos/blade-paris/default.nix +++ b/ops/nixos/blade-paris/default.nix @@ -16,7 +16,7 @@ in { networking = { hostName = "blade-paris"; hostId = "41b2a198"; - interfaces.bond0.ipv4.addresses = [{ + interfaces.br-ext.ipv4.addresses = [{ address = "192.168.1.184"; prefixLength = 24; }]; diff --git a/ops/nixos/blade-torres/default.nix b/ops/nixos/blade-torres/default.nix index a4c496f46e..9c7ff62c3f 100644 --- a/ops/nixos/blade-torres/default.nix +++ b/ops/nixos/blade-torres/default.nix @@ -16,7 +16,7 @@ in { networking = { hostName = "blade-torres"; hostId = "86db1d9c"; - interfaces.bond0.ipv4.addresses = [{ + interfaces.br-ext.ipv4.addresses = [{ address = "192.168.1.185"; prefixLength = 24; }]; diff --git a/ops/nixos/blade-tuvok/default.nix b/ops/nixos/blade-tuvok/default.nix index a599508d3c..a59f66d0db 100644 --- a/ops/nixos/blade-tuvok/default.nix +++ b/ops/nixos/blade-tuvok/default.nix @@ -16,7 +16,7 @@ in { networking = { hostName = "blade-tuvok"; hostId = "525229f7"; - interfaces.bond0.ipv4.addresses = [{ + interfaces.br-ext.ipv4.addresses = [{ address = "192.168.1.181"; prefixLength = 24; }]; diff --git a/ops/nixos/lib/blade.nix b/ops/nixos/lib/blade.nix index 6a4305b197..0490e6d8ef 100644 --- a/ops/nixos/lib/blade.nix +++ b/ops/nixos/lib/blade.nix @@ -45,6 +45,10 @@ in { "enp4s0f0" "enp4s0f1" ]; }; + networking.bridges.br-ext = { + interfaces = [ "bond0" ]; + rstp = false; + }; defaultGateway = "192.168.1.5"; @@ -72,5 +76,10 @@ in { rgw.enable = true; }; + virtualisation.libvirtd = { + enable = true; + qemuRunAsRoot = false; + }; + system.stateVersion = "21.05"; }