Merge pull request #34070 from lukeadams/prl-improve
Improve parallels-tools
This commit is contained in:
commit
5d0d140f74
@ -3,9 +3,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
prl-tools = config.hardware.parallels.package;
|
||||||
prl-tools = config.boot.kernelPackages.prl-tools;
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -22,6 +20,26 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
autoMountShares = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Control prlfsmountd service. When this service is running, shares can not be manually
|
||||||
|
mounted through `mount -t prl_fs ...` as this service will remount and trample any set options.
|
||||||
|
Recommended to enable for simple file sharing, but extended share use such as for code should
|
||||||
|
disable this to manually mount shares.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = config.boot.kernelPackages.prl-tools;
|
||||||
|
defaultText = "config.boot.kernelPackages.prl-tools";
|
||||||
|
example = literalExample "config.boot.kernelPackages.prl-tools";
|
||||||
|
description = ''
|
||||||
|
Defines which package to use for prl-tools. Override to change the version.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -67,7 +85,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.prlfsmountd = {
|
systemd.services.prlfsmountd = mkIf config.hardware.parallels.autoMountShares {
|
||||||
description = "Parallels Shared Folders Daemon";
|
description = "Parallels Shared Folders Daemon";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = rec {
|
serviceConfig = rec {
|
||||||
|
@ -2,9 +2,12 @@
|
|||||||
, gawk, utillinux, xorg, glib, dbus-glib, zlib
|
, gawk, utillinux, xorg, glib, dbus-glib, zlib
|
||||||
, kernel ? null, libsOnly ? false
|
, kernel ? null, libsOnly ? false
|
||||||
, undmg, fetchurl
|
, undmg, fetchurl
|
||||||
|
, libelf
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert (!libsOnly) -> kernel != null;
|
assert (!libsOnly) -> kernel != null;
|
||||||
|
# Disable for kernels 4.15 and above due to compatibility issues
|
||||||
|
assert kernel != null -> stdenv.lib.versionOlder kernel.version "4.15";
|
||||||
|
|
||||||
let xorgFullVer = (builtins.parseDrvName xorg.xorgserver.name).version;
|
let xorgFullVer = (builtins.parseDrvName xorg.xorgserver.name).version;
|
||||||
xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer));
|
xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer));
|
||||||
@ -27,7 +30,7 @@ stdenv.mkDerivation rec {
|
|||||||
hardeningDisable = [ "pic" "format" ];
|
hardeningDisable = [ "pic" "format" ];
|
||||||
|
|
||||||
# also maybe python2 to generate xorg.conf
|
# also maybe python2 to generate xorg.conf
|
||||||
nativeBuildInputs = [ p7zip undmg ] ++ lib.optionals (!libsOnly) [ makeWrapper ];
|
nativeBuildInputs = [ p7zip undmg ] ++ lib.optionals (!libsOnly) [ makeWrapper ] ++ kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
inherit libsOnly;
|
inherit libsOnly;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user