mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
de6968c163
svn path=/nixos/trunk/; revision=32971
21 lines
597 B
Nix
21 lines
597 B
Nix
{ config, pkgs, ... }:
|
||
|
||
with pkgs.lib;
|
||
|
||
let virtualbox = config.boot.kernelPackages.virtualbox; in
|
||
|
||
{
|
||
boot.kernelModules = [ "vboxdrv" "vboxnetadp" "vboxnetflt" ];
|
||
boot.extraModulePackages = [ virtualbox ];
|
||
environment.systemPackages = [ virtualbox ];
|
||
|
||
# ‘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";
|
||
source = "${virtualbox}/virtualbox/VBoxNetAdpCtl";
|
||
owner = "root";
|
||
group = "root";
|
||
setuid = true;
|
||
};
|
||
}
|