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
|
|
|
|
|
|
|
|
|
# ‘VBoxNetAdpCtl’ needs to be setuid root to allow users to create
|
|
|
|
|
# host-only networks (https://www.virtualbox.org/ticket/4014).
|
|
|
|
|
security.setuidOwners = singleton
|
|
|
|
|
{ program = "VBoxNetAdpCtl";
|
2012-03-10 15:34:40 +01:00
|
|
|
|
source = "${virtualbox}/virtualbox/VBoxNetAdpCtl";
|
2012-03-01 21:10:08 +01:00
|
|
|
|
owner = "root";
|
|
|
|
|
group = "root";
|
|
|
|
|
setuid = true;
|
|
|
|
|
};
|
|
|
|
|
}
|