Compare commits
8 Commits
feat/herme
...
feat/ups-c
| Author | SHA1 | Date | |
|---|---|---|---|
| 184e01767d | |||
| c73fae7dc1 | |||
| e798c2f16b | |||
| 36359de6aa | |||
|
|
10b8565fd6 | ||
|
|
f672696b8e | ||
| 0980dca455 | |||
| 96bc20ab70 |
@@ -25,12 +25,3 @@ This document outlines the development conventions for this NixOS-based infrastr
|
|||||||
- **Secrets:** Secrets are managed with `agenix`. Edit encrypted files with `agenix -e <file>`.
|
- **Secrets:** Secrets are managed with `agenix`. Edit encrypted files with `agenix -e <file>`.
|
||||||
- **Modularity:** Structure configurations into logical, reusable modules under `modules/`. New modules should be registered in `modules/nixos/default.nix` to be available to all hosts.
|
- **Modularity:** Structure configurations into logical, reusable modules under `modules/`. New modules should be registered in `modules/nixos/default.nix` to be available to all hosts.
|
||||||
- **Error Handling:** Ensure Nix expressions are robust and handle potential evaluation errors gracefully.
|
- **Error Handling:** Ensure Nix expressions are robust and handle potential evaluation errors gracefully.
|
||||||
|
|
||||||
## Workflow
|
|
||||||
|
|
||||||
- New feature → clean branch from `origin/master` → push → PR on Gitea
|
|
||||||
- Branch naming: `feat/description` (features), `fix/description` (bugs/docs)
|
|
||||||
- Always branch from `origin/master`, never from another feature branch
|
|
||||||
- Submodule changes: commit submodule update in parent repo (the parent commit pins the submodule commit)
|
|
||||||
- PR title should describe the change; body should explain motivation + summary
|
|
||||||
- After PR merge, delete the feature branch
|
|
||||||
|
|||||||
Submodule assets/compose updated: 1ec22ff3fc...b185d43d67
@@ -207,6 +207,7 @@
|
|||||||
ai = {
|
ai = {
|
||||||
path = self + "/assets/compose/ai";
|
path = self + "/assets/compose/ai";
|
||||||
envFile = config.age.secrets.containers_env.path;
|
envFile = config.age.secrets.containers_env.path;
|
||||||
|
ports = [ 22000 ]; # Syncthing TCP sync
|
||||||
};
|
};
|
||||||
|
|
||||||
cloudstorage = {
|
cloudstorage = {
|
||||||
@@ -341,6 +342,44 @@
|
|||||||
HIP_VISIBLE_DEVICES = "0,1";
|
HIP_VISIBLE_DEVICES = "0,1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ── UPS (Uninterruptible Power Supply) ──────────────────────────────
|
||||||
|
# APC Back-UPS BVK1200M2 connected via USB (vendor 051d, product 0002)
|
||||||
|
power.ups = {
|
||||||
|
enable = true;
|
||||||
|
mode = "standalone";
|
||||||
|
|
||||||
|
ups = {
|
||||||
|
apc-backups = {
|
||||||
|
driver = "usbhid-ups";
|
||||||
|
port = "auto";
|
||||||
|
description = "APC Back-UPS BVK1200M2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
upsd = {
|
||||||
|
listen = [{
|
||||||
|
address = "127.0.0.1";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
users = {
|
||||||
|
nutmon = {
|
||||||
|
passwordFile = pkgs.writeText "ups-nutmon-password" "ups-nutmon-2025";
|
||||||
|
upsmon = "primary";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
upsmon = {
|
||||||
|
monitor = {
|
||||||
|
apc-backups = {
|
||||||
|
system = "apc-backups@localhost";
|
||||||
|
user = "nutmon";
|
||||||
|
type = "master";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
|||||||
Reference in New Issue
Block a user