From f41312d75139b832d1684f39632cdd0c57509540 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Aug 2024 20:42:51 +0200 Subject: [PATCH] nixos/hardware.corectrl: remove `with lib;` --- nixos/modules/hardware/corectrl.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/nixos/modules/hardware/corectrl.nix b/nixos/modules/hardware/corectrl.nix index 9e8b69cf6277..88b94e12f6b6 100644 --- a/nixos/modules/hardware/corectrl.nix +++ b/nixos/modules/hardware/corectrl.nix @@ -1,27 +1,24 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.programs.corectrl; in { options.programs.corectrl = { - enable = mkEnableOption '' + enable = lib.mkEnableOption '' CoreCtrl, a tool to overclock amd graphics cards and processors. Add your user to the corectrl group to run corectrl without needing to enter your password ''; - package = mkPackageOption pkgs "corectrl" { + package = lib.mkPackageOption pkgs "corectrl" { extraDescription = "Useful for overriding the configuration options used for the package."; }; gpuOverclock = { - enable = mkEnableOption '' + enable = lib.mkEnableOption '' GPU overclocking ''; - ppfeaturemask = mkOption { - type = types.str; + ppfeaturemask = lib.mkOption { + type = lib.types.str; default = "0xfffd7fff"; example = "0xffffffff"; description = '' @@ -34,7 +31,7 @@ in }; }; - config = mkIf cfg.enable (lib.mkMerge [ + config = lib.mkIf cfg.enable (lib.mkMerge [ { environment.systemPackages = [ cfg.package ];