Change:
Describe the bug The undervolt module is potentially damaging to hardware when misconfigured. The module description needs an appropriate warning informing users that they are taking a risk when enabling it (even though I think it's fairly obvious that's the case). Maintainer information: cc
It would also be nice if the options' description specified what units are expected for the "amount of voltage". And I don't know how feasible it is but if the options accept a floating point number as per their documenation they should perhaps be of a numeric type as well.
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly: for maintainers and people that previously touched the related code and @ mention them in a comment. on the . 3. Ask on the on .
Still relevant.

Discussion:
{ config, pkgs, lib, ... }: with lib; let cfg = config.services.undervolt; <del> in { </del> <ins> cliArgs = lib.cli.toGNUCommandLineShell {} { inherit (cfg) verbose temp ; # `core` and `cache` are both intentionally set to `cfg.coreOffset` as according to the undervolt docs: # #     Core or Cache offsets have no effect. It is not possible to set different offsets for #     CPU Core and Cache. The CPU will take the smaller of the two offsets, and apply that to #     both CPU and Cache. A warning message will be displayed if you attempt to set different offsets. core = cfg.coreOffset; cache = cfg.coreOffset; gpu = cfg.gpuOffset; uncore = cfg.uncoreOffset; analogio = cfg.analogioOffset; temp-bat = cfg.tempBat; temp-ac = cfg.tempAc; }; in { </ins> options.services.undervolt = { <del> enable = mkOption { type = types.bool; default = false; description = '' Whether to undervolt intel cpus. ''; }; </del> <ins> enable = mkEnableOption "Intel CPU undervolting service (WARNING: may permanently damage your hardware!)"; </ins> verbose = mkOption { type = types.bool;

}; coreOffset = mkOption { <del> type = types.nullOr types.str; </del> <ins> type = types.nullOr types.int; </ins> default = null; description = '' <del> The amount of voltage to offset the CPU cores by. Accepts a floating point number. </del> <ins> The amount of voltage in mV to offset the CPU cores by. </ins> ''; }; gpuOffset = mkOption { <del> type = types.nullOr types.str; </del> <ins> type = types.nullOr types.int; </ins> default = null; description = '' <del> The amount of voltage to offset the GPU by. Accepts a floating point number. </del> <ins> The amount of voltage in mV to offset the GPU by. </ins> ''; }; uncoreOffset = mkOption { <del> type = types.nullOr types.str; </del> <ins> type = types.nullOr types.int; </ins> default = null; description = '' <del> The amount of voltage to offset uncore by. Accepts a floating point number. </del> <ins> The amount of voltage in mV to offset uncore by. </ins> ''; }; analogioOffset = mkOption { <del> type = types.nullOr types.str; </del> <ins> type = types.nullOr types.int; </ins> default = null; description = '' <del> The amount of voltage to offset analogio by. Accepts a floating point number. </del> <ins> The amount of voltage in mV to offset analogio by. </ins> ''; }; temp = mkOption { <del> type = types.nullOr types.str; </del> <ins> type = types.nullOr types.int; </ins> default = null; description = '' <del> The temperature target. Accepts a floating point number. </del> <ins> The temperature target in Celsius degrees. </ins> ''; }; tempAc = mkOption { <del> type = types.nullOr types.str; </del> <ins> type = types.nullOr types.int; </ins> default = null; description = '' <del> The temperature target on AC power. Accepts a floating point number. </del> <ins> The temperature target on AC power in Celsius degrees. </ins> ''; }; tempBat = mkOption { <del> type = types.nullOr types.str; </del> <ins> type = types.nullOr types.int; </ins> default = null; description = '' <del> The temperature target on battery power. Accepts a floating point number. </del> <ins> The temperature target on battery power in Celsius degrees. </ins> ''; }; };

serviceConfig = { Type = "oneshot"; Restart = "no"; <del> # `core` and `cache` are both intentionally set to `cfg.coreOffset` as according to the undervolt docs: # #     Core or Cache offsets have no effect. It is not possible to set different offsets for #     CPU Core and Cache. The CPU will take the smaller of the two offsets, and apply that to #     both CPU and Cache. A warning message will be displayed if you attempt to set different offsets. ExecStart = '' ${pkgs.undervolt}/bin/undervolt  ${optionalString cfg.verbose "--verbose"}  ${optionalString (cfg.coreOffset != null) "--core ${cfg.coreOffset}"}  ${optionalString (cfg.coreOffset != null) "--cache ${cfg.coreOffset}"}  ${optionalString (cfg.gpuOffset != null) "--gpu ${cfg.gpuOffset}"}  ${optionalString (cfg.uncoreOffset != null) "--uncore ${cfg.uncoreOffset}"}  ${optionalString (cfg.analogioOffset != null) "--analogio ${cfg.analogioOffset}"}  ${optionalString (cfg.temp != null) "--temp ${cfg.temp}"}  ${optionalString (cfg.tempAc != null) "--temp-ac ${cfg.tempAc}"}  ${optionalString (cfg.tempBat != null) "--temp-bat ${cfg.tempBat}"} ''; </del> <ins> ExecStart = "${pkgs.undervolt}/bin/undervolt ${cliArgs}"; </ins> }; };