mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #5300 from ambrop72/virtualbox-network-interface
virtualbox: Allow disabling the network interface.
This commit is contained in:
commit
e1383d0833
1 changed files with 6 additions and 1 deletions
|
@ -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" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue