nixos/services.fancontrol: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-27 20:43:16 +02:00
parent 3822e798f8
commit 29536d4a4d

View File

@ -1,7 +1,4 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.hardware.fancontrol;
configFile = pkgs.writeText "fancontrol.conf" cfg.config;
@ -9,10 +6,10 @@ let
in
{
options.hardware.fancontrol = {
enable = mkEnableOption "software fan control (requires fancontrol.config)";
enable = lib.mkEnableOption "software fan control (requires fancontrol.config)";
config = mkOption {
type = types.lines;
config = lib.mkOption {
type = lib.types.lines;
description = "Required fancontrol configuration file content. See {manpage}`pwmconfig(8)` from the lm_sensors package.";
example = ''
# Configuration file generated by pwmconfig
@ -29,7 +26,7 @@ in
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
systemd.services.fancontrol = {
documentation = [ "man:fancontrol(8)" ];
@ -51,5 +48,5 @@ in
};
meta.maintainers = [ maintainers.evils ];
meta.maintainers = [ lib.maintainers.evils ];
}