diff --git a/hosts/pennsardin/configuration.nix b/hosts/pennsardin/configuration.nix index 4d26e18..8acbd41 100644 --- a/hosts/pennsardin/configuration.nix +++ b/hosts/pennsardin/configuration.nix @@ -2,7 +2,6 @@ imports = [ ../../profiles/workstation-bspwm.nix ../../modules/hardware/bepovim.nix -# ../../modules/dev/qemu.nix ../../modules/common/nix.nix ]; @@ -49,6 +48,11 @@ users.lomig = import ../../hm/users/lomig-desktop.nix; }; + networking = { + firewall.allowedTCPPorts = [5900 5901 5902]; + bridges.br0.interfaces = ["enp11s0"]; + }; + system.stateVersion = "25.05"; # pour éviter les hurlements inutiles } diff --git a/hosts/terre-neuvas/configuration.nix b/hosts/terre-neuvas/configuration.nix index d7dc8f4..5a37621 100644 --- a/hosts/terre-neuvas/configuration.nix +++ b/hosts/terre-neuvas/configuration.nix @@ -49,6 +49,9 @@ git hugo ]; - networking.firewall.allowedTCPPorts = [ 80 ]; + networking = { + firewall.allowedTCPPorts = [ 80 5900 5901 5902 ]; + bridges.br0.interfaces = [ "eno1" ]; + }; system.stateVersion = "25.05"; # Did you read the comment? } diff --git a/modules/dev/qemu.nix b/modules/common/qemu.nix similarity index 56% rename from modules/dev/qemu.nix rename to modules/common/qemu.nix index e70e4ab..f80d147 100644 --- a/modules/dev/qemu.nix +++ b/modules/common/qemu.nix @@ -3,9 +3,6 @@ pkgs, ... }: { - imports = [ -# ../virtual/truenas.nix - ]; boot.kernelModules = lib.mkAfter ["tun"]; environment.systemPackages = with pkgs; [ qemu_kvm @@ -14,11 +11,7 @@ services = { udev.extraRules = '' - # SUBSYSTEM=="block", ENV{ID_SERIAL}=="wwn-0x50000c500b0179482", GROUP="disk", MODE="0660" - # SUBSYSTEM=="block", ENV{ID_SERIAL}=="wwn-0x50000c500cc529430", GROUP="disk", MODE="0660" - # SUBSYSTEM=="block", ENV{ID_SERIAL}=="wwn-0x50000c500cc53994a", GROUP="disk", MODE="0660" - # SUBSYSTEM=="block", ENV{ID_SERIAL}=="wwn-0x50000c500cc5551d4", GROUP="disk", MODE="0660" - SUBSYSTEM=="vfio", GROUP="kvm", MODE="0660" + SUBSYSTEM=="vfio", GROUP="kvm", MODE="0660" ''; spice-vdagentd.enable = true; resolved.enable = true; @@ -36,9 +29,7 @@ users.users.lomig.extraGroups = ["libvirtd" "kvm" "input"]; networking = { - firewall.allowedTCPPorts = [5900 5901 5902]; useDHCP = false; - bridges.br0.interfaces = ["enp11s0"]; }; systemd.network.networks."10-br0" = { diff --git a/profiles/server-selfhosted.nix b/profiles/server-selfhosted.nix index 23492a2..e4b564d 100644 --- a/profiles/server-selfhosted.nix +++ b/profiles/server-selfhosted.nix @@ -3,6 +3,7 @@ ../modules/roles/server.nix ../modules/common/base.nix ../modules/common/networking.nix + ../modules/common/qemu.nix ../modules/services/printing.nix # ../modules/services/goaccess.nix ../modules/sites/porzh.me.nix diff --git a/profiles/workstation-bspwm.nix b/profiles/workstation-bspwm.nix index 9db2891..44f789a 100644 --- a/profiles/workstation-bspwm.nix +++ b/profiles/workstation-bspwm.nix @@ -14,6 +14,7 @@ ../modules/services/printing.nix ../modules/common/lockscreen.nix ../modules/common/energy.nix + ../modules/common/qemu.nix ]; services.openssh = {