2012-03-01 21:10:08 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
2012-03-10 15:34:40 +01:00
|
|
|
let virtualbox = config.boot.kernelPackages.virtualbox; in
|
|
|
|
|
2012-03-01 21:10:08 +01:00
|
|
|
{
|
|
|
|
boot.kernelModules = [ "vboxdrv" "vboxnetadp" "vboxnetflt" ];
|
2012-03-10 15:34:40 +01:00
|
|
|
boot.extraModulePackages = [ virtualbox ];
|
|
|
|
environment.systemPackages = [ virtualbox ];
|
2012-03-01 21:10:08 +01:00
|
|
|
|
2012-03-20 17:30:43 +01:00
|
|
|
users.extraGroups = singleton { name = "vboxusers"; };
|
|
|
|
|
|
|
|
services.udev.extraRules =
|
|
|
|
''
|
|
|
|
KERNEL=="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"
|
|
|
|
KERNEL=="vboxnetctl", OWNER="root", GROUP="root", MODE="0600"
|
|
|
|
'';
|
2012-03-01 21:10:08 +01:00
|
|
|
}
|