Difference between revisions of "VirtualBox"

From NixOS Wiki
Jump to: navigation, search
(add link to Virt-manager, add Virt-manager to "Possible solutions")
(Add warning about the new wiki)
Line 1: Line 1:
 +
{{warning|1=You are reading an article on the deprecated unofficial wiki. For the up to date version of this article, see https://wiki.nixos.org/wiki/VirtualBox.}}
 +
 
== NixOS Installation ==
 
== NixOS Installation ==
 
VirtualBox can be installed on NixOS without problems, put this snippet in your <code>configuration.nix</code>
 
VirtualBox can be installed on NixOS without problems, put this snippet in your <code>configuration.nix</code>

Revision as of 06:58, 5 April 2024

Warning: You are reading an article on the deprecated unofficial wiki. For the up to date version of this article, see https://wiki.nixos.org/wiki/VirtualBox.

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. Read the FAQ entry to know how to use unfree packages.

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;
}
Warning: Host extensions cause frequent recompilation.

Possible solutions:

VirtualBox Guest Additions

{
  virtualisation.virtualbox.guest.enable = true;
  virtualisation.virtualbox.guest.x11 = true;
}

See also