virtualbox module: allow to pass the package (#44907)

This commit is contained in:
zimbatm 2018-08-11 19:40:00 +01:00 committed by GitHub
parent c7596ef742
commit 1e65420eb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ with lib;
let
cfg = config.virtualisation.virtualbox.host;
virtualbox = pkgs.virtualbox.override {
virtualbox = cfg.package.override {
inherit (cfg) enableExtensionPack enableHardening headless;
};
@ -28,7 +28,14 @@ in
'';
};
enableExtensionPack = mkEnableOption "VirtualBox extension pack";
package = mkOption {
type = types.package;
default = pkgs.virtualbox;
defaultText = "pkgs.virtualbox";
description = ''
Which VirtualBox package to use.
'';
};
addNetworkInterface = mkOption {
type = types.bool;
@ -38,6 +45,8 @@ in
'';
};
enableExtensionPack = mkEnableOption "VirtualBox extension pack";
enableHardening = mkOption {
type = types.bool;
default = true;