nixos-config/modules/core/virtualization.nix

30 lines
652 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
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
}