2023-12-15 19:00:46 +01:00
|
|
|
{ config, pkgs, username, ... }:
|
2023-11-05 11:40:44 +01:00
|
|
|
{
|
2024-01-27 18:53:29 +01:00
|
|
|
# Enable dconf (System Management Tool)
|
2024-01-27 23:36:37 +01:00
|
|
|
# programs.dconf.enable = true;
|
2024-01-27 18:53:29 +01:00
|
|
|
|
2023-11-05 11:40:44 +01:00
|
|
|
# Add user to libvirtd group
|
2023-12-15 19:00:46 +01:00
|
|
|
users.users.${username}.extraGroups = [ "libvirtd" ];
|
2023-11-05 11:40:44 +01:00
|
|
|
|
|
|
|
|
# Install necessary packages
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
virt-manager
|
|
|
|
|
virt-viewer
|
2024-01-27 18:53:29 +01:00
|
|
|
spice spice-gtk
|
2023-11-05 11:40:44 +01:00
|
|
|
spice-protocol
|
|
|
|
|
win-virtio
|
|
|
|
|
win-spice
|
|
|
|
|
gnome.adwaita-icon-theme
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Manage the virtualisation services
|
|
|
|
|
virtualisation = {
|
|
|
|
|
libvirtd = {
|
|
|
|
|
enable = true;
|
|
|
|
|
qemu = {
|
|
|
|
|
swtpm.enable = true;
|
|
|
|
|
ovmf.enable = true;
|
|
|
|
|
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
spiceUSBRedirection.enable = true;
|
|
|
|
|
};
|
|
|
|
|
services.spice-vdagentd.enable = true;
|
2024-01-27 18:53:29 +01:00
|
|
|
}
|