vm: remove bridge network interface, update vm xml, general cleanup

This commit is contained in:
Evar 2025-06-25 01:03:16 -04:00
parent 9030a12931
commit 227c761ebe
5 changed files with 43 additions and 53 deletions

View file

@ -33,10 +33,10 @@
];
# So that I can get to the netgear router
networking.extraHosts = ''
10.0.0.152 routerlogin.net
10.0.0.152 www.routerlogin.net
'';
# networking.extraHosts = ''
# 10.0.0.152 routerlogin.net
# 10.0.0.152 www.routerlogin.net
# '';
services.flatpak.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];

View file

@ -119,15 +119,16 @@ in {
# So I can build for kernel 6.13
# til https://github.com/gnif/LookingGlass/pull/1154 is merged
boot.extraModulePackages = with config.boot.kernelPackages; [
(kvmfr.overrideAttrs (old: {
patches = [ ]; # The patches have already since been merged
src = pkgs.fetchFromGitHub {
owner = "zeule";
repo = "LookingGlass";
rev = "7740692e3000c2019e21b9861585960174dd5ddc";
sha256 = "sha256-2ayH8FXOn4Bflf55WvhMWTDMLwvucmofD3POI72bC+Q=";
};
}))
kvmfr
# (kvmfr.overrideAttrs (old: {
# patches = [ ]; # The patches have already since been merged
# src = pkgs.fetchFromGitHub {
# owner = "zeule";
# repo = "LookingGlass";
# rev = "7740692e3000c2019e21b9861585960174dd5ddc";
# sha256 = "sha256-2ayH8FXOn4Bflf55WvhMWTDMLwvucmofD3POI72bC+Q=";
# };
# }))
];
services.udev.packages = optionals (cfg.devices != [ ]) [ udevPackage ];

View file

@ -25,6 +25,7 @@
uid = 1000;
isNormalUser = true;
extraGroups = [
"libvirtd"
"wheel"
"networkmanager"
"video"

View file

@ -82,33 +82,33 @@ in {
# the network bridge interface with systemctl start network-addresses-winvm0.service,
# and potentially toggle the link state in the vm config
# to get this working. would be good to fix it.
networking.bridges = {
"winvm0" = {
interfaces = [ "eth0" ];
};
};
# networking.bridges = {
# "winvm0" = {
# interfaces = [ "eth0" ];
# };
# };
networking.dhcpcd.denyInterfaces = [ "winvm0" ];
# networking.dhcpcd.denyInterfaces = [ "winvm0" ];
# TODO: the below doesn't actually work, so I just
# disable wait-online entirely.
# ensure the bridge network doesn't cause us to wait
# on boot
# systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
systemd.network.wait-online.anyInterface = true;
boot.initrd.systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
# systemd.network.wait-online.anyInterface = true;
# boot.initrd.systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
# These are needed, since I'm not currently trying to
# reserve a static IP for the bridge interface
networking.defaultGateway = { address = "10.0.0.1"; interface = "eth0"; };
networking.interfaces.winvm0 = {
useDHCP = false;
ipv4 = {
addresses = [
{ address = "10.0.5.1"; prefixLength = 32; }
];
};
};
# networking.defaultGateway = { address = "10.0.0.1"; interface = "eth0"; };
# networking.interfaces.winvm0 = {
# useDHCP = false;
# ipv4 = {
# addresses = [
# { address = "10.0.5.1"; prefixLength = 32; }
# ];
# };
# };
environment.systemPackages = [
# For sharing filesystems
@ -135,7 +135,10 @@ in {
hardware.graphics.enable = true; # needed for display spice opengl
virtualisation.libvirtd = {
enable = true;
qemu.swtpm.enable = true; # for TPM 2.0 support
qemu = {
swtpm.enable = true; # for TPM 2.0 support
ovmf.packages = [ pkgs.OVMFFull.fd ];
};
onBoot = "ignore"; # only start autostart vms, not just ones that were running
onShutdown = "shutdown"; # always shut down the vm's cleanly