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";