system-manager-wakasu
1{ lib, pkgs, ... }:
2{
3 system.nixos.tags = [ "libvirt" ];
4 boot.kernelParams = [ "kvm_intel.nested=1" ];
5 environment.etc."modprobe.d/kvm.conf".text = ''
6 options kvm_intel nested=1
7 '';
8 virtualisation.libvirtd = {
9 enable = true;
10 allowedBridges = [ "br1" ]; # Could be different dependinng on the host ?
11 extraConfig = ''
12 listen_tls = 0
13 listen_tcp = 1
14 auth_tcp="none"
15 tcp_port = "16509"
16 '';
17 # extraOptions = [ "--listen" ];
18 };
19 networking.firewall.allowedTCPPorts = [ 16509 ];
20 security.polkit.enable = true; # 22.11: libvirtd requires poltkit to be enabled
21 environment.systemPackages = with pkgs; [
22 qemu
23 vde2
24 libosinfo
25 ];
26 boot.kernel.sysctl = {
27 "net.ipv4.ip_forward" = lib.mkDefault 1;
28 };
29}