added virtualbox
This commit is contained in:
parent
07605c96a4
commit
8045323643
3 changed files with 33 additions and 1 deletions
32
core/virtualbox.nix
Normal file
32
core/virtualbox.nix
Normal 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;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue