8 cfg = config.programs.coolercontrol;
13 programs.coolercontrol = {
14 enable = lib.mkEnableOption "CoolerControl GUI & its background services";
16 nvidiaSupport = lib.mkOption {
17 type = lib.types.bool;
18 default = lib.elem "nvidia" config.services.xserver.videoDrivers;
19 defaultText = lib.literalExpression "lib.elem \"nvidia\" config.services.xserver.videoDrivers";
21 Enable support for Nvidia GPUs.
28 config = lib.mkIf cfg.enable (lib.mkMerge [
31 environment.systemPackages = with pkgs.coolercontrol; [
36 packages = with pkgs.coolercontrol; [
41 # https://github.com/NixOS/nixpkgs/issues/81138
43 coolercontrol-liqctld.wantedBy = [ "multi-user.target" ];
44 coolercontrold.wantedBy = [ "multi-user.target" ];
50 (lib.mkIf cfg.nvidiaSupport {
51 systemd.services.coolercontrold.path = let
52 nvidiaPkg = config.hardware.nvidia.package;
54 nvidiaPkg # nvidia-smi
55 nvidiaPkg.settings # nvidia-settings
60 meta.maintainers = with lib.maintainers; [ OPNA2608 codifryed ];