2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.hdapsd;
|
|
|
|
hdapsd = [ pkgs.hdapsd ];
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
services.hdapsd.enable = mkEnableOption
|
2022-09-09 14:08:57 +00:00
|
|
|
(lib.mdDoc ''
|
2020-04-24 23:36:52 +00:00
|
|
|
Hard Drive Active Protection System Daemon,
|
|
|
|
devices are detected and managed automatically by udev and systemd
|
2022-09-09 14:08:57 +00:00
|
|
|
'');
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
boot.kernelModules = [ "hdapsd" ];
|
|
|
|
services.udev.packages = hdapsd;
|
|
|
|
systemd.packages = hdapsd;
|
|
|
|
};
|
|
|
|
}
|