1
0
Fork 0
nix-configuration/modules/services/apcupsd.nix

29 lines
467 B
Nix
Raw Normal View History

{
pkgs,
config,
lib,
...
}:
2024-02-29 14:53:34 +00:00
let
cfg = config.host.services.apcupsd;
2024-02-29 14:53:34 +00:00
in
with lib;
{
options = {
host.services.apcupsd = {
enable = mkEnableOption (mdDoc "Enables apcupsd");
configText = lib.mkOption {
type = lib.types.str;
description = "The configuration to pass to apcupsd.";
};
};
};
2024-02-29 14:53:34 +00:00
config = mkIf cfg.enable {
services.apcupsd = {
enable = true;
configText = cfg.configText;
};
};
}