From f54534e7718c1c29e330bade5520d1819572249a Mon Sep 17 00:00:00 2001 From: Lucy von Overheidt Date: Sun, 14 Sep 2025 01:52:18 +0200 Subject: [PATCH] meow --- flake.nix | 1 + hosts/server/configuration.nix | 23 +++++++++++++++++++++++ modules/virtualisation.nix | 5 +++++ 3 files changed, 29 insertions(+) create mode 100644 modules/virtualisation.nix diff --git a/flake.nix b/flake.nix index 17879fd..3bd7d01 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,7 @@ ./modules/podman.nix ./modules/minecraft.nix ./modules/htop.nix + ./modules/virtualisation.nix inputs.comin.nixosModules.comin inputs.flux.nixosModules.default diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 5b07c4a..bc8f7ec 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -24,6 +24,29 @@ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + systemd.network.networks."10-lan" = { + matchConfig.Name = [ "eno1np0" ]; + networkConfig = { + Bridge = "vmbr0"; + }; + }; + + systemd.network.netdevs."vmbr0" = { + netdevConfig = { + Name = "vmbr0"; + Kind = "bridge"; + }; + }; + + systemd.network.networks."10-lan-bridge" = { + matchConfig.Name = "vmbr0"; + networkConfig = { + IPv6AcceptRA = true; + DHCP = "yes"; + }; + linkConfig.RequiredForOnline = "routable"; + }; + # Set your time zone. time.timeZone = "Europe/Berlin"; diff --git a/modules/virtualisation.nix b/modules/virtualisation.nix new file mode 100644 index 0000000..afde5a1 --- /dev/null +++ b/modules/virtualisation.nix @@ -0,0 +1,5 @@ +{ ... }: +{ + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; +}