2024-02-29 14:53:34 +00:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.host.services.apcupsd;
|
|
|
|
in
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
host.services.apcupsd.enable = mkEnableOption (mdDoc "Enables apcupsd");
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.apcupsd = {
|
|
|
|
enable = true;
|
2024-03-02 17:58:30 +00:00
|
|
|
configText = builtins.readFile ./etc/apcupsd.conf;
|
2024-02-29 14:53:34 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|