From 804532364309c4a866e179d1d8ee82e02a211b8e Mon Sep 17 00:00:00 2001 From: serenity-F Date: Sun, 19 Apr 2026 18:20:46 +1000 Subject: [PATCH] added `virtualbox` --- core/hosts/hades/default.nix | 1 + core/virtualbox.nix | 32 ++++++++++++++++++++++++++++++++ home/desktop/default.nix | 1 - 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 core/virtualbox.nix diff --git a/core/hosts/hades/default.nix b/core/hosts/hades/default.nix index 9e7083f..50136fe 100755 --- a/core/hosts/hades/default.nix +++ b/core/hosts/hades/default.nix @@ -12,6 +12,7 @@ # Host-specific core modules ../../../core/zfs.nix ../../../core/gaming.nix + ../../../core/virtualbox.nix ]; diff --git a/core/virtualbox.nix b/core/virtualbox.nix new file mode 100644 index 0000000..5720e3d --- /dev/null +++ b/core/virtualbox.nix @@ -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; + + }; + +} diff --git a/home/desktop/default.nix b/home/desktop/default.nix index 99f7245..9e960b4 100755 --- a/home/desktop/default.nix +++ b/home/desktop/default.nix @@ -138,7 +138,6 @@ in { gnome-calculator # GTK calculator appimage-run # Runs appimages file-roller # Archive manager - #virtualbox # Virtual machine nautilus # GTK File manager swayimg # Terminal based image viewer zathura # PDF viewer