Added virtualbox service, which fixes the RandR problem and also keeps the guest's clock in sync with the host

svn path=/nixos/trunk/; revision=23672
This commit is contained in:
Sander van der Burg 2010-09-07 13:28:17 +00:00
parent c9dc3651da
commit 10a3bd6ffe
2 changed files with 47 additions and 0 deletions

View file

@ -68,6 +68,7 @@
./services/misc/nixos-manual.nix
./services/misc/rogue.nix
./services/misc/synergy.nix
./services/misc/virtualbox.nix
./services/monitoring/monit.nix
./services/monitoring/nagios/default.nix
./services/monitoring/systemhealth.nix

View file

@ -0,0 +1,46 @@
# VirtualBox server
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.virtualbox;
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 = [ ];
jobs.virtualbox =
{ description = "VirtualBox service";
startOn = "started udev";
exec = "${pkgs.linuxPackages.virtualboxGuestAdditions}/sbin/VBoxService";
};
};
}