1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6 cfg = config.services.hdapsd;
7 hdapsd = [ pkgs.hdapsd ];
8in
9{
10 options = {
11 services.hdapsd.enable = mkEnableOption ''
12 Hard Drive Active Protection System Daemon,
13 devices are detected and managed automatically by udev and systemd
14 '';
15 };
16
17 config = mkIf cfg.enable {
18 boot.kernelModules = [ "hdapsd" ];
19 services.udev.packages = hdapsd;
20 systemd.packages = hdapsd;
21 };
22}