nixos/virtualbox-guest: Allow using in-tree kernel modules (#466002)

This commit is contained in:
Sandro
2025-12-04 17:41:45 +00:00
committed by GitHub
@@ -95,6 +95,12 @@ in
type = lib.types.bool;
description = "Whether to load vboxsf";
};
use3rdPartyModules = lib.mkOption {
default = true;
type = lib.types.bool;
description = "Whether to use the kernel modules provided by VirtualBox instead of the ones from the upstream kernel.";
};
};
###### implementation
@@ -111,7 +117,7 @@ in
environment.systemPackages = [ kernel.virtualboxGuestAdditions ];
boot.extraModulePackages = [ kernel.virtualboxGuestAdditions ];
boot.extraModulePackages = lib.mkIf cfg.use3rdPartyModules [ kernel.virtualboxGuestAdditions ];
systemd.services.virtualbox = {
description = "VirtualBox Guest Services";