From 9d1c00df9619315f4ed68d8481658f4fdbf84bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 22 Apr 2023 12:19:16 +0100 Subject: [PATCH] explicit bridge networking on bolty --- nixos/boxes/bolty/default.nix | 1 + nixos/boxes/bolty/networking.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 nixos/boxes/bolty/networking.nix diff --git a/nixos/boxes/bolty/default.nix b/nixos/boxes/bolty/default.nix index b463f761..87df61d3 100644 --- a/nixos/boxes/bolty/default.nix +++ b/nixos/boxes/bolty/default.nix @@ -6,6 +6,7 @@ ./home-assistant.nix ./influxdb.nix ./matrix-server.nix + ./networking.nix ./nix-store-server.nix ./print-server.nix ./real-hardware.nix diff --git a/nixos/boxes/bolty/networking.nix b/nixos/boxes/bolty/networking.nix new file mode 100644 index 00000000..3a52ae93 --- /dev/null +++ b/nixos/boxes/bolty/networking.nix @@ -0,0 +1,19 @@ +{ config, pkgs, inputs, lib, ... }: { + networking.hostName = "bolty"; + systemd.network.enable = true; + networking.networkmanager.enable = false; + systemd.network.netdevs."br0".netdevConfig = { + Name = "br0"; + Kind = "bridge"; + }; + systemd.network.networks."br0" = { + name = "br0"; + address = [ "10.0.0.8/24" ]; + DHCP = "yes"; + }; + + systemd.network.networks."eth" = { + name = "enp4s0"; + networkConfig.Bridge = "br0"; + }; +}