mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
add ups periodic checks
This commit is contained in:
parent
09eabcc6b2
commit
da480a7c4e
13 changed files with 533 additions and 403 deletions
11
flake.nix
11
flake.nix
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
# this is for uv 0.6.17, 0.7.0 has a change uv2nix doesn't yet support: https://github.com/astral-sh/uv/pull/13176
|
||||
nixpkgs-29335f.url = "github:nixos/nixpkgs/29335f23bea5e34228349ea739f31ee79e267b88";
|
||||
|
||||
pyproject-nix = {
|
||||
url = "github:pyproject-nix/pyproject.nix";
|
||||
|
|
@ -27,7 +25,6 @@
|
|||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-29335f,
|
||||
uv2nix,
|
||||
pyproject-nix,
|
||||
pyproject-build-systems,
|
||||
|
|
@ -73,7 +70,8 @@
|
|||
old: {
|
||||
postPatch = ''
|
||||
substituteInPlace src/lego_monitoring/core/const.py \
|
||||
--replace-fail 'VULNIX_PATH: str = ...' 'VULNIX_PATH = "${lib.getExe pkgs.vulnix}"'
|
||||
--replace-fail 'VULNIX_PATH: str = ...' 'VULNIX_PATH = "${lib.getExe pkgs.vulnix}"' \
|
||||
--replace-fail 'UPSC_PATH = "/usr/bin/upsc"' 'UPSC_PATH = "${pkgs.nut}/bin/upsc"'
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
|
@ -81,7 +79,6 @@
|
|||
|
||||
# This example is only using x86_64-linux
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
pkgs-29335f = nixpkgs-29335f.legacyPackages.x86_64-linux;
|
||||
|
||||
# Use Python 3.12 from nixpkgs
|
||||
python = pkgs.python312;
|
||||
|
|
@ -129,7 +126,7 @@
|
|||
impure = pkgs.mkShell {
|
||||
packages = [
|
||||
python
|
||||
pkgs-29335f.uv
|
||||
pkgs.uv
|
||||
];
|
||||
env =
|
||||
{
|
||||
|
|
@ -209,7 +206,7 @@
|
|||
pkgs.mkShell {
|
||||
packages = [
|
||||
virtualenv
|
||||
pkgs-29335f.uv
|
||||
pkgs.uv
|
||||
];
|
||||
|
||||
env = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue