From a8207ffcb8888480bc3278c8ee4587d8d0d11d2f Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 8 Jan 2025 14:37:47 +0100 Subject: [PATCH] Configures UPS for NixOS server --- hosts/dnsc-server/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hosts/dnsc-server/default.nix b/hosts/dnsc-server/default.nix index 050f369..5811904 100644 --- a/hosts/dnsc-server/default.nix +++ b/hosts/dnsc-server/default.nix @@ -76,6 +76,7 @@ jellyfin jellyfin-web jellyfin-ffmpeg + usbutils ]; # Programs @@ -85,6 +86,23 @@ enableSSHSupport = true; }; + # UPS + power.ups = { + enable = true; + + ups."eaton-ups" = { + driver = "usbhid-ups"; + port = "auto"; + }; + + users.upsmon = { + passwordFile = "/etc/upsmon.passwd"; + upsmon = "primary"; + }; + + upsmon.monitor."eaton-ups".user = "upsmon"; + }; + # Services # SSH services.openssh = {