Commit 206665a8b841
Changed files (1)
systems
modules
profiles
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 ];
+ })
]);
}