From 60369bb333534d0cfcfe7bd34958b5a95739a60a Mon Sep 17 00:00:00 2001 From: Martin Schwaighofer Date: Wed, 20 Oct 2021 16:12:07 +0200 Subject: [PATCH] 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. --- nixos/modules/virtualisation/vmware-guest.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/virtualisation/vmware-guest.nix b/nixos/modules/virtualisation/vmware-guest.nix index 7b25ffc440f8..480a9703cef3 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";