nixos-config/modules/core/virtualization.nix

38 lines
753 B
Nix
Raw Normal View History

2023-12-15 19:00:46 +01:00
{ config, pkgs, username, ... }:
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
spice
spice-gtk
spice-protocol
win-virtio
win-spice
gnome.adwaita-icon-theme
virtiofsd
];
# 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:00:07 +01:00
vmware.host = {
enable = true;
package = pkgs.vmware-workstation;
};
2023-11-05 11:40:44 +01:00
}