Compare commits

..

3 Commits

Author SHA1 Message Date
184e01767d update-openconcho-fork 2026-05-28 17:15:45 -04:00
c73fae7dc1 feat: add telos static site compose service (telos.lazyworkhorse.net) 2026-05-25 00:19:18 -04:00
e798c2f16b feat: add APC Back-UPS BVK1200M2 NUT configuration
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
2026-05-25 00:15:58 -04:00
5 changed files with 41 additions and 110 deletions

View File

@@ -12,17 +12,10 @@
url = "git+https://git.lix.systems/lix-project/lix?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
dotfiles = {
url = "git+https://code.lazyworkhorse.net/gortium/dotfiles.git";
flake = false;
};
self.submodules = true;
};
outputs = { self, nixpkgs, agenix, lix, home-manager, dotfiles, ... }@inputs:
outputs = { self, nixpkgs, agenix, lix, ... }@inputs:
let
system = "x86_64-linux";
keys = import ./lib/keys.nix;
@@ -63,7 +56,6 @@
agenix.nixosModules.default
./hosts/lazyworkhorse/configuration.nix
./hosts/lazyworkhorse/hardware-configuration.nix
./modules/nixos/home-manager/default.nix
./modules/nixos/filesystem/hoardingcow-mount.nix
./modules/nixos/services/docker_manager.nix
./modules/nixos/services/open_code_server.nix

View File

@@ -342,6 +342,44 @@
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.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];

View File

@@ -1,12 +0,0 @@
{ config, pkgs, lib, inputs, ... }:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.gortium = import ./dotfiles.nix { inherit config pkgs lib inputs; };
};
}

View File

@@ -1,87 +0,0 @@
{ config, pkgs, lib, inputs, ... }:
{
home = {
username = "gortium";
homeDirectory = "/home/gortium";
stateVersion = "25.11";
};
# Import dotfiles as-is via home.file (Option 3 — git way)
# Hyprland
home.file.".config/hypr/hyprland.conf".source =
"${inputs.dotfiles}/hypr/.config/hypr/hyprland.conf";
home.file.".config/hypr/mocha.conf".source =
"${inputs.dotfiles}/hypr/.config/hypr/mocha.conf";
home.file.".config/hypr/hyprlock.conf".source =
"${inputs.dotfiles}/hypr/.config/hypr/hyprlock.conf";
home.file.".config/hypr/hypridle.conf".source =
"${inputs.dotfiles}/hypr/.config/hypr/hypridle.conf";
home.file.".config/hypr/hyprpaper.conf".source =
"${inputs.dotfiles}/hypr/.config/hypr/hyprpaper.conf";
home.file.".config/hypr/hyprshade.toml".source =
"${inputs.dotfiles}/hypr/.config/hypr/hyprshade.toml";
# Host-specific overrides: sourced from hyprland.conf
# hyprland.conf includes: source = ~/.config/hypr/hosts/$HOST.conf
# This file is created per-host and contains only the diffs.
home.file.".config/hypr/hosts" = {
source = "${inputs.dotfiles}/hypr/.config/hypr/hosts";
recursive = true;
};
# Zsh
home.file.".zshrc".source = "${inputs.dotfiles}/zsh/.zshrc";
# Tmux
home.file.".tmux.conf".source = "${inputs.dotfiles}/tmux/.tmux.conf";
# Neovim
home.file.".config/nvim" = {
source = "${inputs.dotfiles}/nvim/.config/nvim";
recursive = true;
};
# Wallpapers
home.file.".config/wallpapers" = {
source = "${inputs.dotfiles}/wallpapers/.config/wallpapers";
recursive = true;
};
# Wofi
home.file.".config/wofi" = {
source = "${inputs.dotfiles}/wofi/.config/wofi";
recursive = true;
};
# Packages that should be installed with home-manager
home.packages = with pkgs; [
# CLI tools
ripgrep
fd
jq
fzf
bat
eza
zoxide
# Development
git
lazygit
gh
# Hyprland extras
hyprshot
swaynotificationcenter
swww
wofi
waybar
kitty
foot
brightnessctl
playerctl
udiskie
hyprshade
pyprland
];
}