From f9de205aad5e9a25568d25c3c59989b1df259a59 Mon Sep 17 00:00:00 2001 From: catvayor Date: Fri, 19 Apr 2024 21:10:14 +0200 Subject: [PATCH] feat(upsd): Enabling upsd --- machines/vault01/_configuration.nix | 1 + machines/vault01/ups.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 machines/vault01/ups.nix diff --git a/machines/vault01/_configuration.nix b/machines/vault01/_configuration.nix index 3eb5c51..f55bb8e 100644 --- a/machines/vault01/_configuration.nix +++ b/machines/vault01/_configuration.nix @@ -10,6 +10,7 @@ lib.extra.mkConfig { # List of services to enable "k-radius" "networking" + "ups" ]; extraConfig = { diff --git a/machines/vault01/ups.nix b/machines/vault01/ups.nix new file mode 100644 index 0000000..69934fd --- /dev/null +++ b/machines/vault01/ups.nix @@ -0,0 +1,21 @@ +# { pkgs, ... }: +{ + power.ups = { + enable = true; + ups."eaton" = { + driver = "usbhid-ups"; + port = "auto"; + }; + upsmon.enable = false; + # users."eatonMon" = { + # passwordFile = (pkgs.writeTextFile { + # name = "pass"; + # text = "YFEAee2%9PuPcEKf$7vW$3a&wdvNJME%UkP2Z~RVkk4ZaQHYW^"; + # }).outPath; + # upsmon = "primary"; + # }; + # upsmon.monitor."eaton" = { + # user = "eatonMon"; + # }; + }; +}