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 ''
13 Hard Drive Active Protection System Daemon,
14 devices are detected and managed automatically by udev and systemd
15 '';
16 };
17
18 config = mkIf cfg.enable {
19 services.udev.packages = hdapsd;
20 systemd.packages = hdapsd;
21 };
22}