{
config,
lib,
pkgs,
...
}:
with lib;
let
prl-tools = config.hardware.parallels.package;
in
imports = [
(mkRemovedOptionModule [
"hardware"
"parallels"
"autoMountShares"
] "Shares are always automatically mounted since Parallels Desktop 20.")
];
options = {
hardware.parallels = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
This enables Parallels Tools for Linux guests, along with provided
video, mouse and other hardware drivers.
'';
};
package = mkOption {
type = types.nullOr types.package;
default = config.boot.kernelPackages.prl-tools;
defaultText = "config.boot.kernelPackages.prl-tools";
example = literalExpression "config.boot.kernelPackages.prl-tools";
Defines which package to use for prl-tools. Override to change the version.
config = mkIf config.hardware.parallels.enable {
services.udev.packages = [ prl-tools ];
environment.systemPackages = [ prl-tools ];
boot.extraModulePackages = [ prl-tools ];
boot.kernelModules = [
"prl_fs"
"prl_fs_freeze"
"prl_tg"
] ++ optional (pkgs.stdenv.hostPlatform.system == "aarch64-linux") "prl_notifier";
services.timesyncd.enable = false;
systemd.services.prltoolsd = {
description = "Parallels Tools Service";
wantedBy = [ "multi-user.target" ];
path = [ prl-tools ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prltoolsd -f";
PIDFile = "/var/run/prltoolsd.pid";
WorkingDirectory = "${prl-tools}/bin";
systemd.services.prlshprint = {
description = "Parallels Printing Tool";
bindsTo = [ "cups.service" ];
ExecStart = "${prl-tools}/bin/prlshprint";
systemd.user.services = {
prlcc = {
description = "Parallels Control Center";
wantedBy = [ "graphical-session.target" ];
ExecStart = "${prl-tools}/bin/prlcc";
prldnd = {
description = "Parallels Drag And Drop Tool";
ExecStart = "${prl-tools}/bin/prldnd";
prlcp = {
description = "Parallels Copy Paste Tool";
ExecStart = "${prl-tools}/bin/prlcp";
Restart = "always";
prlsga = {
description = "Parallels Shared Guest Applications Tool";
ExecStart = "${prl-tools}/bin/prlsga";
prlshprof = {
description = "Parallels Shared Profile Tool";
ExecStart = "${prl-tools}/bin/prlshprof";
}