nixpkgs/modules/virtualisation/virtualbox-guest.nix
Eelco Dolstra d9d6fb58e4 * Prevent the VirtualBox guest additions from being restarted
constantly by Upstart.  Also move the module to a better location.

svn path=/nixos/trunk/; revision=32565
2012-02-25 20:10:53 +00:00

51 lines
792 B
Nix

# Module for VirtualBox guests.
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.virtualbox;
kernel = config.boot.kernelPackages;
in
{
###### interface
options = {
services.virtualbox = {
enable = mkOption {
default = false;
description = "Whether to enable the VirtualBox service and other guest additions.";
};
};
};
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ kernel.virtualboxGuestAdditions ];
boot.extraModulePackages = [ kernel.virtualboxGuestAdditions ];
jobs.virtualbox =
{ description = "VirtualBox service";
startOn = "started udev";
exec = "${kernel.virtualboxGuestAdditions}/sbin/VBoxService --foreground";
};
};
}