diff --git a/modules/core/virtualization.nix b/modules/core/virtualization.nix index 3ad3ae8..b021936 100644 --- a/modules/core/virtualization.nix +++ b/modules/core/virtualization.nix @@ -1,4 +1,10 @@ -{ pkgs, host, ... }: +{ + pkgs, + host, + config, + username, + ... +}: { virtualisation = { # vmware.host.enable = true; # Causes issues for now :p @@ -12,10 +18,23 @@ true else false; - spiceUSBRedirection.enable = true; + spiceUSBRedirection.enable = + if (config.virtualisation.libvirtd.enable == true) then true else false; }; - programs.virt-manager.enable = true; + programs.virt-manager.enable = + if (config.virtualisation.waydroid.enable == true) then true else false; + #dconf.settings."org/virt-manager/virt-manager/connections" = + # if (config.programs.virt-manager.enable == true) then + # { + # autoconnect = [ "qemu:///system" ]; + # uris = [ "qemu:///system" ]; + # } + # else + # { }; + + users.groups.libvirtd.members = + if (config.virtualisation.waydroid.enable == true) then [ username ] else [ ]; # Enable qemu etc environment.systemPackages = with pkgs; [