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:
parent
c9dc3651da
commit
10a3bd6ffe
@ -68,6 +68,7 @@
|
|||||||
./services/misc/nixos-manual.nix
|
./services/misc/nixos-manual.nix
|
||||||
./services/misc/rogue.nix
|
./services/misc/rogue.nix
|
||||||
./services/misc/synergy.nix
|
./services/misc/synergy.nix
|
||||||
|
./services/misc/virtualbox.nix
|
||||||
./services/monitoring/monit.nix
|
./services/monitoring/monit.nix
|
||||||
./services/monitoring/nagios/default.nix
|
./services/monitoring/nagios/default.nix
|
||||||
./services/monitoring/systemhealth.nix
|
./services/monitoring/systemhealth.nix
|
||||||
|
46
modules/services/misc/virtualbox.nix
Normal file
46
modules/services/misc/virtualbox.nix
Normal 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";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user