git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #34070 from lukeadams/prl-improve

Improve parallels-tools

commit5d0d140f740fb357bf92a332e658fa39d20ac598 authorJörg Thalheim <Mic92@users.noreply.github.com> dateSat 3 Mar 2018, 17:34 (9 years ago) parent6e316ed552105d
2 files changed+26−5
nixos/modules/virtualisation/parallels-guest.nix+22−4 pkgs/os-specific/linux/prl-tools/default.nix+4−1
nixos/modules/virtualisation/parallels-guest.nix+22−4
@@ -3,9 +3,7 @@
33with lib;
44
55let
6−
7− prl-tools = config.boot.kernelPackages.prl-tools;
8−
6+ prl-tools = config.hardware.parallels.package;
97in
108
119{
@@ -22,6 +20,26 @@ in
2220 '';
2321 };
2422
23+ autoMountShares = mkOption {
24+ type = types.bool;
25+ default = true;
26+ description = ''
27+ Control prlfsmountd service. When this service is running, shares can not be manually
28+ mounted through `mount -t prl_fs ...` as this service will remount and trample any set options.
29+ Recommended to enable for simple file sharing, but extended share use such as for code should
30+ disable this to manually mount shares.
31+ '';
32+ };
33+
34+ package = mkOption {
35+ type = types.package;
36+ default = config.boot.kernelPackages.prl-tools;
37+ defaultText = "config.boot.kernelPackages.prl-tools";
38+ example = literalExample "config.boot.kernelPackages.prl-tools";
39+ description = ''
40+ Defines which package to use for prl-tools. Override to change the version.
41+ '';
42+ };
2543 };
2644
2745 };
@@ -67,7 +85,7 @@ in
6785 };
6886 };
6987
70− systemd.services.prlfsmountd = {
88+ systemd.services.prlfsmountd = mkIf config.hardware.parallels.autoMountShares {
7189 description = "Parallels Shared Folders Daemon";
7290 wantedBy = [ "multi-user.target" ];
7391 serviceConfig = rec {
pkgs/os-specific/linux/prl-tools/default.nix+4−1
@@ -2,9 +2,12 @@
22, gawk, utillinux, xorg, glib, dbus-glib, zlib
33, kernel ? null, libsOnly ? false
44, undmg, fetchurl
5+, libelf
56}:
67
78assert (!libsOnly) -> kernel != null;
9+# Disable for kernels 4.15 and above due to compatibility issues
10+assert kernel != null -> stdenv.lib.versionOlder kernel.version "4.15";
811
912let xorgFullVer = (builtins.parseDrvName xorg.xorgserver.name).version;
1013 xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer));
@@ -27,7 +30,7 @@ stdenv.mkDerivation rec {
2730 hardeningDisable = [ "pic" "format" ];
2831
2932 # also maybe python2 to generate xorg.conf
30− nativeBuildInputs = [ p7zip undmg ] ++ lib.optionals (!libsOnly) [ makeWrapper ];
33+ nativeBuildInputs = [ p7zip undmg ] ++ lib.optionals (!libsOnly) [ makeWrapper ] ++ kernel.moduleBuildDependencies;
3134
3235 inherit libsOnly;
3336