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

23 lines
455 B
Nix
Raw Permalink Normal View History

2024-08-02 17:55:48 -04:00
{ config, lib, ... }:
2024-02-29 09:53:34 -05:00
let
cfg = config.aux.system.services.apcupsd;
2024-02-29 09:53:34 -05:00
in
{
options = {
aux.system.services.apcupsd = {
2024-08-02 17:55:48 -04:00
enable = lib.mkEnableOption "Enables apcupsd";
configText = lib.mkOption {
type = lib.types.str;
description = "The configuration to pass to apcupsd.";
};
};
};
2024-02-29 09:53:34 -05:00
2024-08-02 17:55:48 -04:00
config = lib.mkIf cfg.enable {
services.apcupsd = {
enable = true;
configText = cfg.configText;
};
};
}