Update and get rid of VirtualBox ! Hurray ! (Friendship with VirtualBox ended, now KVM is my best friend)

This commit is contained in:
zuma 2025-04-13 23:20:30 +02:00
parent d44435832a
commit 416b46e04c
3 changed files with 46 additions and 41 deletions

View file

@ -110,7 +110,7 @@
isNormalUser = true;
description = "zuma";
shell = pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" "docker" "vboxsf"];
extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd"];
};
home-manager = {
@ -218,6 +218,7 @@
activitywatch # Stats on time spent
awatcher # Wayland Idle and window watcher
swaynotificationcenter # Notification daemon and notification center
virtiofsd # Device backend for libvrtd
];
services.gvfs.enable = true; # Enable Trash so that if I delete my nix files without having saved them I can backup .........
@ -236,9 +237,10 @@
};
};
virtualisation.virtualbox.host.enable = true;
virtualisation.virtualbox.host.enableExtensionPack = true;
users.extraGroups.vboxusers.members = [ "zuma" ];
programs.virt-manager.enable = true;
users.groups.libvirtd.members = ["zuma"];
virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
fonts.packages = with pkgs; [
nerd-fonts.fira-code

View file

@ -13,11 +13,14 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.kernelParams = [
# For VirtualBox to work
# https://github.com/NixOS/nixpkgs/issues/363887
"kvm.enable_virt_at_load=0"
# For libvirtd (KVM emulation)
# https://blog.redstone.engineer/posts/nixos-windows-guest-graphical-improvement-filesystem-clipboard-sharing-guide/
boot.extraModprobeConfig = ''
options kvm_intel nested=1
options kvm ignore_msrs=1
'';
boot.kernelParams = [
# Hyrpland suspend / wakeup
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
];