nixos/services.hdapsd: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-30 00:46:58 +02:00
parent 8f9336460b
commit 95e5f256d6

View File

@ -1,20 +1,17 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.hdapsd;
hdapsd = [ pkgs.hdapsd ];
in
{
options = {
services.hdapsd.enable = mkEnableOption ''
services.hdapsd.enable = lib.mkEnableOption ''
Hard Drive Active Protection System Daemon,
devices are detected and managed automatically by udev and systemd
'';
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
boot.kernelModules = [ "hdapsd" ];
services.udev.packages = hdapsd;
systemd.packages = hdapsd;