3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #5300 from ambrop72/virtualbox-network-interface

virtualbox: Allow disabling the network interface.
This commit is contained in:
Jaka Hudoklin 2014-12-11 23:51:52 +01:00
commit e1383d0833

View file

@ -9,6 +9,11 @@ in
{
options = {
services.virtualboxHost.enable = mkEnableOption "VirtualBox Host support";
services.virtualboxHost.addNetworkInterface = mkOption {
type = types.bool;
default = true;
description = "Automatically set up a vboxnet0 host-only network interface.";
};
};
config = mkIf config.services.virtualboxHost.enable {
@ -46,7 +51,7 @@ in
'';
# Since we lack the right setuid binaries, set up a host-only network by default.
} // mkIf config.services.virtualboxHost.addNetworkInterface {
systemd.services."vboxnet0" =
{ description = "VirtualBox vboxnet0 Interface";
requires = [ "dev-vboxnetctl.device" ];