2024-05-21 00:52:57 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2024-06-24 15:38:28 +00:00
|
|
|
cfg = config.aux.system.services.boinc;
|
2024-05-21 00:52:57 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
2024-06-24 15:38:28 +00:00
|
|
|
aux.system.services.boinc.enable = lib.mkEnableOption (
|
2024-05-21 00:52:57 +00:00
|
|
|
lib.mdDoc "Enables BOINC distributed computing service."
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
services.boinc = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.boinc-headless;
|
|
|
|
dataDir = "/var/lib/boinc";
|
2024-07-08 16:52:07 +00:00
|
|
|
extraEnvPackages = [
|
|
|
|
pkgs.ocl-icd
|
|
|
|
] ++ lib.optionals config.aux.system.gpu.nvidia.enable [ pkgs.linuxPackages.nvidia_x11 ];
|
2024-05-27 00:04:43 +00:00
|
|
|
allowRemoteGuiRpc = true;
|
2024-05-21 00:52:57 +00:00
|
|
|
};
|
2024-05-27 00:04:43 +00:00
|
|
|
|
|
|
|
# Allow connections via BOINC Manager
|
|
|
|
networking.firewall.allowedTCPPorts = [ 31416 ];
|
2024-05-21 00:52:57 +00:00
|
|
|
};
|
|
|
|
}
|