Merge pull request #5300 from ambrop72/virtualbox-network-interface
virtualbox: Allow disabling the network interface.
This commit is contained in:
commit
e1383d0833
@ -9,6 +9,11 @@ in
|
|||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
services.virtualboxHost.enable = mkEnableOption "VirtualBox Host support";
|
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 {
|
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.
|
# Since we lack the right setuid binaries, set up a host-only network by default.
|
||||||
|
} // mkIf config.services.virtualboxHost.addNetworkInterface {
|
||||||
systemd.services."vboxnet0" =
|
systemd.services."vboxnet0" =
|
||||||
{ description = "VirtualBox vboxnet0 Interface";
|
{ description = "VirtualBox vboxnet0 Interface";
|
||||||
requires = [ "dev-vboxnetctl.device" ];
|
requires = [ "dev-vboxnetctl.device" ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user