summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorambrop7@gmail.com <Ambroz Bizjak>2014-12-11 23:28:09 +0100
committerambrop7@gmail.com <Ambroz Bizjak>2014-12-11 23:35:03 +0100
commit9fa2c35ec8199951f217296e40f534c1e2e0f336 (patch)
tree2c18e617cd60d61812f6074fb5622158e293c692 /nixos/modules
parent4be10897817f25336856a0a6bcd20582cb130943 (diff)
downloadnixlib-9fa2c35ec8199951f217296e40f534c1e2e0f336.tar
nixlib-9fa2c35ec8199951f217296e40f534c1e2e0f336.tar.gz
nixlib-9fa2c35ec8199951f217296e40f534c1e2e0f336.tar.bz2
nixlib-9fa2c35ec8199951f217296e40f534c1e2e0f336.tar.lz
nixlib-9fa2c35ec8199951f217296e40f534c1e2e0f336.tar.xz
nixlib-9fa2c35ec8199951f217296e40f534c1e2e0f336.tar.zst
nixlib-9fa2c35ec8199951f217296e40f534c1e2e0f336.zip
virtualbox: Allow disabling the network interface.
The current nixos module for VirtualBox unconditionally configures a vboxnet0
network interface at boot. This may be undesired, especially when the user wants
to manage network interfaces in a centralized manner.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/programs/virtualbox-host.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/programs/virtualbox-host.nix b/nixos/modules/programs/virtualbox-host.nix
index ea962d5d6cee..45d5ec01d302 100644
--- a/nixos/modules/programs/virtualbox-host.nix
+++ b/nixos/modules/programs/virtualbox-host.nix
@@ -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" ];