summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2016-12-01 16:59:53 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-02-10 20:12:00 +0200
commita14ef4ad5270a5ee51bdc28d405854ec69d18149 (patch)
tree1d26c28d9087e805905e8f39d6ffa9113070f4ba /nixos/modules
parent182a369ab9409d19938bf805843b63a6c76948f6 (diff)
downloadnixpkgs-a14ef4ad5270a5ee51bdc28d405854ec69d18149.tar
nixpkgs-a14ef4ad5270a5ee51bdc28d405854ec69d18149.tar.gz
nixpkgs-a14ef4ad5270a5ee51bdc28d405854ec69d18149.tar.bz2
nixpkgs-a14ef4ad5270a5ee51bdc28d405854ec69d18149.tar.lz
nixpkgs-a14ef4ad5270a5ee51bdc28d405854ec69d18149.tar.xz
nixpkgs-a14ef4ad5270a5ee51bdc28d405854ec69d18149.tar.zst
nixpkgs-a14ef4ad5270a5ee51bdc28d405854ec69d18149.zip
open-vm-tools: 10.0.7 -> 10.1.0
Also add an option to disable all the X11 stuff.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/virtualisation/vmware-guest.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/vmware-guest.nix b/nixos/modules/virtualisation/vmware-guest.nix
index ac5f87817fe..ce1224a8f13 100644
--- a/nixos/modules/virtualisation/vmware-guest.nix
+++ b/nixos/modules/virtualisation/vmware-guest.nix
@@ -4,12 +4,19 @@ with lib;
 
 let
   cfg = config.services.vmwareGuest;
-  open-vm-tools = pkgs.open-vm-tools;
+  open-vm-tools = if cfg.headless then pkgs.open-vm-tools-headless else pkgs.open-vm-tools;
   xf86inputvmmouse = pkgs.xorg.xf86inputvmmouse;
 in
 {
   options = {
-    services.vmwareGuest.enable = mkEnableOption "VMWare Guest Support";
+    services.vmwareGuest = {
+      enable = mkEnableOption "VMWare Guest Support";
+      headless = mkOption {
+        type = types.bool;
+        default = false;
+        description = "Whether to disable X11-related features.";
+      };
+    };
   };
 
   config = mkIf cfg.enable {
@@ -28,7 +35,7 @@ in
 
     environment.etc."vmware-tools".source = "${pkgs.open-vm-tools}/etc/vmware-tools/*";
 
-    services.xserver = {
+    services.xserver = mkIf (!cfg.headless) {
       videoDrivers = mkOverride 50 [ "vmware" ];
       modules = [ xf86inputvmmouse ];