Skip to content

Commit

Permalink
Add Eaton 5P550R configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ethnt committed Nov 13, 2024
1 parent c93473f commit 26d07e9
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 10 deletions.
2 changes: 1 addition & 1 deletion deploy/ansible/group_vars/networking.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
nut_server_user: apc
nut_server_user: eaton
nut_server_host: controller
2 changes: 1 addition & 1 deletion deploy/ansible/roles/common/files/nut/apc/upsmon.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MONITOR apc@controller:3493 1 follower "132010" slave
MONITOR eaton@controller:3493 1 follower "132010" slave

RUN_AS_USER root

Expand Down
28 changes: 21 additions & 7 deletions deploy/terraform/vms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ resource "proxmox_virtual_environment_vm" "omnibus" {
}

vga {
enabled = true
memory = 16
type = "std"
}

hostpci {
Expand Down Expand Up @@ -81,6 +82,14 @@ resource "proxmox_virtual_environment_vm" "omnibus" {
rombar = true
xvga = false
}

hostpci {
device = "hostpci4"
id = "0000:06:00"
pcie = false
rombar = true
xvga = false
}
}

resource "proxmox_virtual_environment_vm" "htpc" {
Expand Down Expand Up @@ -135,7 +144,8 @@ resource "proxmox_virtual_environment_vm" "htpc" {
}

vga {
enabled = true
memory = 16
type = "std"
}

# Quadro P4000
Expand Down Expand Up @@ -207,7 +217,8 @@ resource "proxmox_virtual_environment_vm" "builder" {
}

vga {
enabled = true
memory = 16
type = "std"
}
}

Expand Down Expand Up @@ -268,7 +279,8 @@ resource "proxmox_virtual_environment_vm" "matrix" {
}

vga {
enabled = true
memory = 16
type = "std"
}

hostpci {
Expand Down Expand Up @@ -341,7 +353,8 @@ resource "proxmox_virtual_environment_vm" "router" {
}

vga {
enabled = true
memory = 16
type = "std"
}

operating_system {
Expand Down Expand Up @@ -428,11 +441,12 @@ resource "proxmox_virtual_environment_vm" "controller" {
}

vga {
enabled = true
memory = 16
type = "std"
}

usb {
host = "051d:0002"
host = "0463:ffff"
usb3 = true
}

Expand Down
2 changes: 1 addition & 1 deletion hosts/controller/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
profiles.networking.unifi
profiles.telemetry.prometheus-smokeping-exporter
profiles.telemetry.prometheus-unpoller-exporter.satan
profiles.power.apc-back-ups-xs-1500
profiles.power.eaton-5p550r
profiles.telemetry.prometheus-nut-exporter
] ++ [ ./disk-config.nix ./hardware-configuration.nix ];

Expand Down
25 changes: 25 additions & 0 deletions modules/profiles/power/eaton-5p550r.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ config, ... }: {
imports = [ ./common.nix ];

power.ups = {
ups.eaton = {
driver = "usbhid-ups";
description = "Eaton 5P550R";
port = "auto";
directives = [
"vendorid = 0463"
"productid = ffff"
"override.battery.charge.low = 10"
"override.battery.runtime.low = 180"
];
};

upsmon.monitor.eaton = {
user = "leader";
powerValue = 1;
type = "master";
passwordFile = config.sops.secrets.upsmon_password.path;
system = "[email protected]:3493";
};
};
}

0 comments on commit 26d07e9

Please sign in to comment.