2025-09-09 08:13:15 +02:00
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
host,
|
|
|
|
|
config,
|
|
|
|
|
username,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2023-11-05 11:40:44 +01:00
|
|
|
{
|
2025-04-14 09:24:35 +02:00
|
|
|
virtualisation = {
|
2025-05-05 16:45:12 +02:00
|
|
|
# vmware.host.enable = true; # Causes issues for now :p
|
2025-08-17 14:08:13 +02:00
|
|
|
waydroid.enable = if (host == "sakura") then true else false;
|
|
|
|
|
libvirtd.enable =
|
|
|
|
|
if (host == "violet") then
|
|
|
|
|
true
|
2025-09-25 23:54:28 +02:00
|
|
|
else if (host == "dandelion") then
|
|
|
|
|
true
|
2025-08-17 14:08:13 +02:00
|
|
|
else if (host == "sakura") then
|
|
|
|
|
true
|
|
|
|
|
else if (host == "yoshino") then
|
|
|
|
|
true
|
2025-09-05 18:44:50 +02:00
|
|
|
else if (host == "iris") then
|
|
|
|
|
true
|
2025-10-26 01:08:48 +02:00
|
|
|
else if (host == "imilia") then
|
|
|
|
|
true
|
2025-08-17 14:08:13 +02:00
|
|
|
else
|
|
|
|
|
false;
|
2025-09-09 08:13:15 +02:00
|
|
|
spiceUSBRedirection.enable =
|
|
|
|
|
if (config.virtualisation.libvirtd.enable == true) then true else false;
|
2025-04-14 09:24:35 +02:00
|
|
|
};
|
2025-05-05 16:45:12 +02:00
|
|
|
|
2025-09-09 08:13:15 +02:00
|
|
|
programs.virt-manager.enable =
|
2025-10-26 01:40:01 +02:00
|
|
|
if (config.virtualisation.libvirtd.enable == true) then true else false;
|
2025-09-09 08:13:15 +02:00
|
|
|
#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 =
|
2025-09-25 23:54:28 +02:00
|
|
|
if (config.virtualisation.libvirtd.enable == true) then [ username ] else [ ];
|
2025-05-05 16:45:12 +02:00
|
|
|
|
|
|
|
|
# Enable qemu etc
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
qemu
|
|
|
|
|
quickemu
|
|
|
|
|
];
|
2024-12-20 00:20:58 +01:00
|
|
|
}
|