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
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user