summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Schwaighofer <mschwaig@users.noreply.github.com>2021-10-20 16:12:07 +0200
committerMartin Schwaighofer <mschwaig@users.noreply.github.com>2021-10-20 16:12:07 +0200
commit60369bb333534d0cfcfe7bd34958b5a95739a60a (patch)
treeef1efeb56c0f7c86ebcf81c8a9af962dcbcb489b
parent6c91deb32a1920415d214183b6a58e3c2b2b36f3 (diff)
downloadnixpkgs-60369bb333534d0cfcfe7bd34958b5a95739a60a.tar
nixpkgs-60369bb333534d0cfcfe7bd34958b5a95739a60a.tar.gz
nixpkgs-60369bb333534d0cfcfe7bd34958b5a95739a60a.tar.bz2
nixpkgs-60369bb333534d0cfcfe7bd34958b5a95739a60a.tar.lz
nixpkgs-60369bb333534d0cfcfe7bd34958b5a95739a60a.tar.xz
nixpkgs-60369bb333534d0cfcfe7bd34958b5a95739a60a.tar.zst
nixpkgs-60369bb333534d0cfcfe7bd34958b5a95739a60a.zip
nixos/vmware-guest: fix headless option
The headless option broke with 7d8b303e3fd76ccf58cfe26348e889def3663546
because the path /bin/vmware-user-suid-wrapper does not exist in the
headless variant of the open-vm-tools package.

Since the vmblock fuse mount and vmware-user-suid-wrapper seem to only
be used for shared folders and drag and drop, they should not exist in
the vmware-guest module if it is configured as headless.
-rw-r--r--nixos/modules/virtualisation/vmware-guest.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/vmware-guest.nix b/nixos/modules/virtualisation/vmware-guest.nix
index 7b25ffc440f..480a9703cef 100644
--- a/nixos/modules/virtualisation/vmware-guest.nix
+++ b/nixos/modules/virtualisation/vmware-guest.nix
@@ -38,7 +38,7 @@ in
       };
 
     # Mount the vmblock for drag-and-drop and copy-and-paste.
-    systemd.mounts = [
+    systemd.mounts = mkIf (!cfg.headless) [
       {
         description = "VMware vmblock fuse mount";
         documentation = [ "https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt" ];
@@ -52,8 +52,8 @@ in
       }
     ];
 
-    security.wrappers.vmware-user-suid-wrapper =
-      { setuid = true;
+    security.wrappers.vmware-user-suid-wrapper = mkIf (!cfg.headless) {
+        setuid = true;
         owner = "root";
         group = "root";
         source = "${open-vm-tools}/bin/vmware-user-suid-wrapper";