feat: add APC Back-UPS BVK1200M2 NUT configuration #70

Open
Hermes wants to merge 3 commits from feat/ups-config into master
Collaborator

Summary

Configures NUT (Network UPS Tools) via the NixOS built-in power.ups module for the APC Back-UPS BVK1200M2 connected via USB.

Changes

  • configuration.nix — Added power.ups block in hosts/lazyworkhorse/configuration.nix

Configuration details

Setting Value
UPS Model APC Back-UPS BVK1200M2
USB Vendor/Product 051d / 0002
Driver usbhid-ups
Port auto
Mode standalone (local monitoring only)
upsd listen 127.0.0.1 (not exposed to network)
upsmon Master, graceful shutdown via systemctl poweroff

Verification required

After deploying (nixos-rebuild switch --flake .#lazyworkhorse):

  1. Check UPS status: upsc apc-backups@localhost
  2. Verify driver: upsdrvctl status
  3. Test graceful shutdown behavior is configured correctly

Notes

  • Password is embedded via pkgs.writeText (acceptable for localhost-only standalone mode). For enhanced security, this could be migrated to agenix if network exposure is ever needed.
  • No firewall ports opened — openFirewall is not set, and upsd only listens on localhost.
  • The nut package (nut-2.8.4) is pulled automatically by the power.ups module.
## Summary Configures NUT (Network UPS Tools) via the NixOS built-in `power.ups` module for the **APC Back-UPS BVK1200M2** connected via USB. ## Changes - **configuration.nix** — Added `power.ups` block in `hosts/lazyworkhorse/configuration.nix` ## Configuration details | Setting | Value | |---------|-------| | UPS Model | APC Back-UPS BVK1200M2 | | USB Vendor/Product | 051d / 0002 | | Driver | `usbhid-ups` | | Port | `auto` | | Mode | `standalone` (local monitoring only) | | upsd listen | `127.0.0.1` (not exposed to network) | | upsmon | Master, graceful shutdown via `systemctl poweroff` | ## Verification required After deploying (`nixos-rebuild switch --flake .#lazyworkhorse`): 1. Check UPS status: `upsc apc-backups@localhost` 2. Verify driver: `upsdrvctl status` 3. Test graceful shutdown behavior is configured correctly ## Notes - Password is embedded via `pkgs.writeText` (acceptable for localhost-only standalone mode). For enhanced security, this could be migrated to agenix if network exposure is ever needed. - No firewall ports opened — `openFirewall` is not set, and upsd only listens on localhost. - The `nut` package (`nut-2.8.4`) is pulled automatically by the `power.ups` module.
Hermes added 1 commit 2026-05-25 04:16:44 +00:00
Add power.ups module configuration for the APC Back-UPS BVK1200M2
connected via USB (vendor 051d, product 0002) in standalone mode.

- Driver: usbhid-ups with auto port detection
- upsd listening on localhost only
- upsmon configured as master for graceful shutdown
- Uses the built-in NixOS power.ups module
Hermes added 2 commits 2026-05-28 21:16:12 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/ups-config:feat/ups-config
git checkout feat/ups-config
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gortium/infra#70
No description provided.