VirtualBox: Difference between revisions

From NixOS Wiki
imported>Nix
m Nix moved page Virtualbox to VirtualBox: match official casing
imported>Nix
m add Virtualization category
Line 9: Line 9:
Adding users to the group vboxusers allows them to use the virtualbox functionality.
Adding users to the group vboxusers allows them to use the virtualbox functionality.
{{Evaluate}}
{{Evaluate}}
== VirtualBox Oracle Extensions ==
== VirtualBox Oracle Extensions ==
{{unfree}}
{{unfree}}
Line 22: Line 23:


Host extensions cause frequent recompilation.
Host extensions cause frequent recompilation.


Possible solutions:  
Possible solutions:  
Line 29: Line 29:
* Also see  https://stackoverflow.com/questions/48838411/install-virtualbox-modules-from-nixos-unstable-in-configuration-nix
* Also see  https://stackoverflow.com/questions/48838411/install-virtualbox-modules-from-nixos-unstable-in-configuration-nix
* Use module from https://github.com/NixOS/nixpkgs/pull/71127 (unsafe) if you'd like to avoid recompilation.
* Use module from https://github.com/NixOS/nixpkgs/pull/71127 (unsafe) if you'd like to avoid recompilation.
[[Category:Virtualization]]
[[Category:Software]]

Revision as of 08:05, 24 September 2021

NixOS Installation

VirtualBox can be installed on NixOS without problems, put this snippet in your configuration.nix

{
   virtualisation.virtualbox.host.enable = true;
   users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ];
}

Adding users to the group vboxusers allows them to use the virtualbox functionality.

VirtualBox Oracle Extensions

Note: This package is unfree and requires extra steps to install.

Oracle VirtualBox Extensions are required if you want to forward usb2 or usb3 to your guests. The Extensions are unfree.

{
   nixpkgs.config.allowUnfree = true;
   virtualisation.virtualbox.host.enable = true;
   virtualisation.virtualbox.host.enableExtensionPack = true;
}

Host extensions cause frequent recompilation.

Possible solutions: