Commit 206665a8b841

Vincent Demeester <vincent@sbr.pm>
2020-10-12 11:42:54
systems: format virtualization
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent bf7cb2e
Changed files (1)
systems
modules
systems/modules/profiles/virtualization.nix
@@ -31,34 +31,28 @@ in
         libosinfo
       ];
     }
-    (
-      mkIf cfg.nested {
-        boot.kernelParams = [ "kvm_intel.nested=1" ];
-        environment.etc."modprobe.d/kvm.conf".text = ''
-          options kvm_intel nested=1
+    (mkIf cfg.nested {
+      boot.kernelParams = [ "kvm_intel.nested=1" ];
+      environment.etc."modprobe.d/kvm.conf".text = ''
+        options kvm_intel nested=1
+      '';
+    })
+    (mkIf config.profiles.desktop.enable {
+      environment.systemPackages = with pkgs; [ virtmanager ];
+    })
+    (mkIf cfg.listenTCP {
+      boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; };
+      virtualisation.libvirtd = {
+        allowedBridges = [ "br1" ];
+        extraConfig = ''
+          listen_tls = 0
+          listen_tcp = 1
+          auth_tcp="none"
+          tcp_port = "16509"
         '';
-      }
-    )
-    (
-      mkIf config.profiles.desktop.enable {
-        environment.systemPackages = with pkgs; [ virtmanager ];
-      }
-    )
-    (
-      mkIf cfg.listenTCP {
-        boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; };
-        virtualisation.libvirtd = {
-          allowedBridges = [ "br1" ];
-          extraConfig = ''
-            listen_tls = 0
-            listen_tcp = 1
-            auth_tcp="none"
-            tcp_port = "16509"
-          '';
-          # extraOptions = [ "--listen" ];
-        };
-        networking.firewall.allowedTCPPorts = [ 16509 ];
-      }
-    )
+        # extraOptions = [ "--listen" ];
+      };
+      networking.firewall.allowedTCPPorts = [ 16509 ];
+    })
   ]);
 }