diff --git a/nixos/modules/programs/coolercontrol.nix b/nixos/modules/programs/coolercontrol.nix index 03aa774ad846..000fb091bcc6 100644 --- a/nixos/modules/programs/coolercontrol.nix +++ b/nixos/modules/programs/coolercontrol.nix @@ -13,18 +13,16 @@ in options = { programs.coolercontrol = { enable = lib.mkEnableOption "CoolerControl GUI & its background services"; - - nvidiaSupport = lib.mkOption { - type = lib.types.bool; - default = lib.elem "nvidia" config.services.xserver.videoDrivers; - defaultText = lib.literalExpression "lib.elem \"nvidia\" config.services.xserver.videoDrivers"; - description = '' - Enable support for Nvidia GPUs. - ''; - }; }; }; + imports = [ + # Added 2025-10-25 + (lib.mkRemovedOptionModule [ "programs" "coolercontrol" "nvidiaSupport" ] '' + This option is deprecated as Nvidia drivers are automatically loaded at runtime. + '') + ]; + ##### implementation config = lib.mkIf cfg.enable ( lib.mkMerge [ @@ -47,18 +45,6 @@ in }; }; } - - # Nvidia support - (lib.mkIf cfg.nvidiaSupport { - systemd.services.coolercontrold.path = - let - nvidiaPkg = config.hardware.nvidia.package; - in - [ - nvidiaPkg # nvidia-smi - nvidiaPkg.settings # nvidia-settings - ]; - }) ] ); diff --git a/pkgs/applications/system/coolercontrol/coolercontrold.nix b/pkgs/applications/system/coolercontrol/coolercontrold.nix index 394bd3f6a393..7bdaa624ac68 100644 --- a/pkgs/applications/system/coolercontrol/coolercontrold.nix +++ b/pkgs/applications/system/coolercontrol/coolercontrold.nix @@ -4,6 +4,7 @@ libdrm, coolercontrol, runtimeShell, + addDriverRunpath, }: { @@ -20,6 +21,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-ZyYyQcaYd3VZ7FL0Hki33JO3LscPfBT5gl+nw2cXvUs="; buildInputs = [ libdrm ]; + nativeBuildInputs = [ addDriverRunpath ]; postPatch = '' # copy the frontend static resources to a directory for embedding @@ -37,6 +39,10 @@ rustPlatform.buildRustPackage { --replace-fail '/usr/bin' "$out/bin" ''; + postFixup = '' + addDriverRunpath "$out/bin/coolercontrold" + ''; + passthru.tests.version = testers.testVersion { package = coolercontrol.coolercontrold; # coolercontrold prints its version with "v" prefix