···
cfg = config.services.boinc;
allowRemoteGuiRpcFlag = optionalString cfg.allowRemoteGuiRpc "--allow_remote_gui_rpc";
+
fhsEnv = pkgs.buildFHSUserEnv {
+
name = "boinc-fhs-env";
+
targetPkgs = pkgs': [ cfg.package ] ++ cfg.extraEnvPackages;
+
runScript = "/bin/boinc_client";
+
fhsEnvExecutable = "${fhsEnv}/bin/${fhsEnv.name}";
options.services.boinc = {
···
See also: <link xlink:href="http://boinc.berkeley.edu/wiki/Controlling_BOINC_remotely#Remote_access"/>
+
extraEnvPackages = mkOption {
+
type = types.listOf types.package;
+
example = "[ pkgs.virtualbox ]";
+
Additional packages to make available in the environment in which
+
BOINC will run. Common choices are:
+
<term><varname>pkgs.virtualbox</varname></term>
+
The VirtualBox virtual machine framework. Required by some BOINC
+
projects, such as ATLAS@home.
+
<term><varname>pkgs.ocl-icd</varname></term>
+
OpenCL infrastructure library. Required by BOINC projects that
+
use OpenCL, in addition to a device-specific OpenCL driver.
+
<term><varname>pkgs.linuxPackages.nvidia_x11</varname></term>
+
Provides CUDA libraries. Required by BOINC projects that use
+
CUDA. Note that this requires an NVIDIA graphics device to be
+
Also provides OpenCL drivers for NVIDIA GPUs;
+
<varname>pkgs.ocl-icd</varname> is also needed in this case.
config = mkIf cfg.enable {
···
chown boinc ${cfg.dataDir}
+
${fhsEnvExecutable} --dir ${cfg.dataDir} --redirectio ${allowRemoteGuiRpcFlag}
PermissionsStartOnly = true; # preStart must be run as root