From 581e8109e10705e6233d966462f429f0497b0ad2 Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Wed, 27 Mar 2024 13:36:41 -0500 Subject: [PATCH] enable upsmon --- hosts/nas/configuration.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hosts/nas/configuration.nix b/hosts/nas/configuration.nix index 8094fe7..5b5a620 100644 --- a/hosts/nas/configuration.nix +++ b/hosts/nas/configuration.nix @@ -330,6 +330,23 @@ in { }; }; + # Add UPS monitoring service + services.upsmon = { + enable = true; + # Configure UPS device + device = "/dev/usb/hiddev1"; # Change this to your UPS device + driver = "usbhid-ups"; # Change this if your UPS uses a different driver + # Set UPS monitoring options + options = { + # NOTIFYCMD = "/path/to/notify-script.sh"; # Path to your notification script + POLLFREQ = 5; + POLLFREQALERT = 5; + HOSTSYNC = "on"; + DEADTIME = 15; + FINALDELAY = 5; + }; + }; + # Configure nixpkgs nixpkgs = { config = {