From e3918110e1e7b8685cb7cd961725b46a7e57ca34 Mon Sep 17 00:00:00 2001 From: Dominik Saar Date: Fri, 24 Apr 2026 11:28:14 +0200 Subject: [PATCH] nixos/parallels-guest: fix prltoolsd on NixOS for Parallels 26+ Parallels Desktop 26+ changed the shared folder mount base path from /media/psf to /mnt/psf. The prltoolsd daemon tries to create mount point subdirectories under /mnt/psf at runtime using mkdir, which fails on NixOS because /mnt/psf does not exist. Fix: create /mnt/psf declaratively via systemd.tmpfiles. Additionally, prltoolsd's shell mount scripts invoke coreutils utilities (tail, mkdir, chmod) and sed without inheriting the service PATH in all execution paths. Add coreutils and gnused to the service path so these tools are reliably available. Note: prltoolsd also attempts to update /etc/fstab, which is a read-only Nix store symlink on NixOS. This produces a harmless warning but does not affect the FUSE-based mounting via prl_fsd. Tested on: NixOS 26.05, Parallels Desktop 26.3.0-57392, aarch64 --- nixos/modules/virtualisation/parallels-guest.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/parallels-guest.nix b/nixos/modules/virtualisation/parallels-guest.nix index 490a6beab3f6..5402fe29ee7e 100644 --- a/nixos/modules/virtualisation/parallels-guest.nix +++ b/nixos/modules/virtualisation/parallels-guest.nix @@ -47,10 +47,20 @@ in services.timesyncd.enable = false; + # Parallels Desktop 26+ mounts shared folders under /mnt/psf by default. + # prltoolsd tries to create subdirectories there at runtime, which fails + # if /mnt/psf does not exist. Create it declaratively via tmpfiles. + systemd.tmpfiles.rules = [ + "d /mnt/psf 0755 root root - -" + ]; + systemd.services.prltoolsd = { description = "Parallels Tools Service"; wantedBy = [ "multi-user.target" ]; - path = [ prl-tools ]; + # prltoolsd mount scripts invoke coreutils (tail, mkdir, chmod) + # and gnused (sed) without inheriting the service PATH in all + # code paths. Make them available alongside prl-tools. + path = [ prl-tools pkgs.coreutils pkgs.gnused ]; serviceConfig = { ExecStart = "${prl-tools}/bin/prltoolsd -f"; PIDFile = "/var/run/prltoolsd.pid";