From 6fb11e5227ec84acee9ac9e28694583783ce0b61 Mon Sep 17 00:00:00 2001 From: Piotr Bogdan Date: Thu, 11 Jun 2020 14:42:40 +0100 Subject: [PATCH] nixos/undervolt: add a warning for the `enable` option Also use the convenience `mkEnableOption` function for simplicity. --- nixos/modules/services/hardware/undervolt.nix | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/nixos/modules/services/hardware/undervolt.nix b/nixos/modules/services/hardware/undervolt.nix index e5ef0601de3c..284440975fe3 100644 --- a/nixos/modules/services/hardware/undervolt.nix +++ b/nixos/modules/services/hardware/undervolt.nix @@ -1,18 +1,13 @@ { config, pkgs, lib, ... }: with lib; - let cfg = config.services.undervolt; -in { +in +{ options.services.undervolt = { - enable = mkOption { - type = types.bool; - default = false; - description = '' - Whether to undervolt intel cpus. - ''; - }; + enable = mkEnableOption + "Intel CPU undervolting service (WARNING: may permanently damage your hardware!)"; verbose = mkOption { type = types.bool;