2024-05-07 18:02:59 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-02-29 09:53:34 -05:00
|
|
|
let
|
2024-05-07 18:02:59 -04:00
|
|
|
cfg = config.host.services.apcupsd;
|
2024-02-29 09:53:34 -05:00
|
|
|
in
|
|
|
|
with lib;
|
|
|
|
{
|
2024-05-07 18:02:59 -04:00
|
|
|
options = {
|
|
|
|
host.services.apcupsd.enable = mkEnableOption (mdDoc "Enables apcupsd");
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.apcupsd = {
|
|
|
|
enable = true;
|
|
|
|
configText = builtins.readFile ./etc/apcupsd.conf;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|