2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
prl-tools = config.hardware.parallels.package;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
imports = [
|
|
|
|
(mkRemovedOptionModule [ "hardware" "parallels" "autoMountShares" ] "Shares are always automatically mounted since Parallels Desktop 20.")
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
options = {
|
|
|
|
hardware.parallels = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
This enables Parallels Tools for Linux guests, along with provided
|
|
|
|
video, mouse and other hardware drivers.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
package = mkOption {
|
2020-09-25 04:45:31 +00:00
|
|
|
type = types.nullOr types.package;
|
2020-04-24 23:36:52 +00:00
|
|
|
default = config.boot.kernelPackages.prl-tools;
|
2022-07-18 16:21:45 +00:00
|
|
|
defaultText = "config.boot.kernelPackages.prl-tools";
|
|
|
|
example = literalExpression "config.boot.kernelPackages.prl-tools";
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
boot.kernelModules = [ "prl_fs" "prl_fs_freeze" "prl_tg" ]
|
|
|
|
++ optional (pkgs.stdenv.hostPlatform.system == "aarch64-linux") "prl_notifier";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
services.timesyncd.enable = false;
|
|
|
|
|
|
|
|
systemd.services.prltoolsd = {
|
2022-07-18 16:21:45 +00:00
|
|
|
description = "Parallels Tools Service";
|
2020-04-24 23:36:52 +00:00
|
|
|
wantedBy = [ "multi-user.target" ];
|
2022-07-18 16:21:45 +00:00
|
|
|
path = [ prl-tools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${prl-tools}/bin/prltoolsd -f";
|
|
|
|
PIDFile = "/var/run/prltoolsd.pid";
|
2022-07-18 16:21:45 +00:00
|
|
|
WorkingDirectory = "${prl-tools}/bin";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.prlshprint = {
|
2022-07-18 16:21:45 +00:00
|
|
|
description = "Parallels Printing Tool";
|
2020-04-24 23:36:52 +00:00
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
bindsTo = [ "cups.service" ];
|
2022-07-18 16:21:45 +00:00
|
|
|
path = [ prl-tools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${prl-tools}/bin/prlshprint";
|
2022-07-18 16:21:45 +00:00
|
|
|
WorkingDirectory = "${prl-tools}/bin";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.services = {
|
|
|
|
prlcc = {
|
|
|
|
description = "Parallels Control Center";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
2022-07-18 16:21:45 +00:00
|
|
|
path = [ prl-tools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${prl-tools}/bin/prlcc";
|
2022-07-18 16:21:45 +00:00
|
|
|
WorkingDirectory = "${prl-tools}/bin";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
prldnd = {
|
2022-07-18 16:21:45 +00:00
|
|
|
description = "Parallels Drag And Drop Tool";
|
2020-04-24 23:36:52 +00:00
|
|
|
wantedBy = [ "graphical-session.target" ];
|
2022-07-18 16:21:45 +00:00
|
|
|
path = [ prl-tools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${prl-tools}/bin/prldnd";
|
2022-07-18 16:21:45 +00:00
|
|
|
WorkingDirectory = "${prl-tools}/bin";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
prlcp = {
|
2022-07-18 16:21:45 +00:00
|
|
|
description = "Parallels Copy Paste Tool";
|
2020-04-24 23:36:52 +00:00
|
|
|
wantedBy = [ "graphical-session.target" ];
|
2022-07-18 16:21:45 +00:00
|
|
|
path = [ prl-tools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${prl-tools}/bin/prlcp";
|
2022-07-18 16:21:45 +00:00
|
|
|
Restart = "always";
|
|
|
|
WorkingDirectory = "${prl-tools}/bin";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
prlsga = {
|
|
|
|
description = "Parallels Shared Guest Applications Tool";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
2022-07-18 16:21:45 +00:00
|
|
|
path = [ prl-tools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${prl-tools}/bin/prlsga";
|
2022-07-18 16:21:45 +00:00
|
|
|
WorkingDirectory = "${prl-tools}/bin";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
prlshprof = {
|
|
|
|
description = "Parallels Shared Profile Tool";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
2022-07-18 16:21:45 +00:00
|
|
|
path = [ prl-tools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${prl-tools}/bin/prlshprof";
|
2022-07-18 16:21:45 +00:00
|
|
|
WorkingDirectory = "${prl-tools}/bin";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|