added virtualbox

This commit is contained in:
serenity-F 2026-04-19 18:20:46 +10:00
parent 07605c96a4
commit 8045323643
No known key found for this signature in database
3 changed files with 33 additions and 1 deletions

32
core/virtualbox.nix Normal file
View file

@ -0,0 +1,32 @@
{ user, ... }:
let
# Name of the group needed to use VirtualBox
vboxgroup = "vmusers";
in {
# Permissions configuration
users = {
# Creates the group providing access to VirtualBox
extraGroups."${vboxgroup}".members = [ "user-with-access-to-virtualbox" ];
# Adds primary user to vboxusers group
users."${user}".extraGroups = [ "vboxusers" ];
};
# VirtualBox configuration
virtualisation.virtualbox = {
# Enables VirtualBox with this machine as the host
host.enable = true;
# Needed for USB2 and USB3 passthrough
host.enableExtensionPack = true;
};
}