mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 08:26:12 +01:00
31
hosts/modules/vm.nix
Normal file
31
hosts/modules/vm.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ pkgs, username, ... }:
|
||||
{
|
||||
users.users.${username}.extraGroups = [ "libvirtd" ];
|
||||
boot.kernel.sysctl = { "vm.max_map_count" = 2147483642; };
|
||||
|
||||
# Install necessary packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virt-viewer
|
||||
spice
|
||||
spice-gtk
|
||||
spice-protocol
|
||||
win-virtio
|
||||
win-spice
|
||||
adwaita-icon-theme
|
||||
];
|
||||
|
||||
services.spice-vdagentd.enable = true;
|
||||
|
||||
virtualisation = {
|
||||
spiceUSBRedirection.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user