2012-03-01 20:10:08 +00:00
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
2012-03-10 14:34:40 +00:00
|
|
|
|
let virtualbox = config.boot.kernelPackages.virtualbox; in
|
|
|
|
|
|
2012-03-01 20:10:08 +00:00
|
|
|
|
{
|
|
|
|
|
boot.kernelModules = [ "vboxdrv" "vboxnetadp" "vboxnetflt" ];
|
2012-03-10 14:34:40 +00:00
|
|
|
|
boot.extraModulePackages = [ virtualbox ];
|
|
|
|
|
environment.systemPackages = [ virtualbox ];
|
2012-03-01 20:10:08 +00: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 14:34:40 +00:00
|
|
|
|
source = "${virtualbox}/virtualbox/VBoxNetAdpCtl";
|
2012-03-01 20:10:08 +00:00
|
|
|
|
owner = "root";
|
|
|
|
|
group = "root";
|
|
|
|
|
setuid = true;
|
|
|
|
|
};
|
|
|
|
|
}
|