1
0
Fork 0
nix-configuration/modules/services/boinc.nix

33 lines
672 B
Nix
Raw Normal View History

2024-05-20 20:52:57 -04:00
{
config,
lib,
pkgs,
...
}:
let
cfg = config.aux.system.services.boinc;
2024-05-20 20:52:57 -04:00
in
{
options = {
aux.system.services.boinc.enable = lib.mkEnableOption (
2024-05-20 20:52:57 -04: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";
extraEnvPackages = [
pkgs.ocl-icd
] ++ lib.optionals config.aux.system.gpu.nvidia.enable [ pkgs.linuxPackages.nvidia_x11 ];
2024-05-26 20:04:43 -04:00
allowRemoteGuiRpc = true;
2024-05-20 20:52:57 -04:00
};
2024-05-26 20:04:43 -04:00
# Allow connections via BOINC Manager
networking.firewall.allowedTCPPorts = [ 31416 ];
2024-05-20 20:52:57 -04:00
};
}