git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit60369bb333534d0cfcfe7bd34958b5a95739a60a authorMartin Schwaighofer <mschwaig@users.noreply.github.com> dateWed 20 Oct 2021, 16:12 (5 years ago) parent6c91deb
1 file changed+3−3
nixos/modules/virtualisation/vmware-guest.nix+3−3
nixos/modules/virtualisation/vmware-guest.nix+3−3
@@ -38,7 +38,7 @@ in
3838 };
3939
4040 # Mount the vmblock for drag-and-drop and copy-and-paste.
41− systemd.mounts = [
41+ systemd.mounts = mkIf (!cfg.headless) [
4242 {
4343 description = "VMware vmblock fuse mount";
4444 documentation = [ "https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt" ];
@@ -52,8 +52,8 @@ in
5252 }
5353 ];
5454
55− security.wrappers.vmware-user-suid-wrapper =
56− { setuid = true;
55+ security.wrappers.vmware-user-suid-wrapper = mkIf (!cfg.headless) {
56+ setuid = true;
5757 owner = "root";
5858 group = "root";
5959 source = "${open-vm-tools}/bin/vmware-user-suid-wrapper";