Commit Graph

1609 Commits

Author SHA1 Message Date
0df5d98770 grafana: use postgresql
Doesn't use for data, only annotation and other stuff
2026-04-07 12:44:59 -04:00
2848c7e897 grafana: keep data forever 2026-04-07 12:44:46 -04:00
e57c9cb83b xmrig-auto-pause: raise thresholds for server background load 2026-04-07 01:09:16 -04:00
d48f27701f xmrig-auto-pause: add hysteresis to prevent stop/start thrashing
xmrig's RandomX pollutes the L3 cache, making other processes appear
~3-8% busier. With a single 5% threshold for both stopping and
resuming, the script oscillates: start xmrig -> cache pressure
inflates CPU -> stop xmrig -> CPU drops -> restart -> repeat.

Split into CPU_STOP_THRESHOLD (15%) and CPU_RESUME_THRESHOLD (5%).
The stop threshold sits above xmrig's indirect pressure, so only
genuine workloads trigger a pause. The resume threshold confirms the
system is truly idle before restarting.
2026-04-07 01:09:06 -04:00
738861fd53 lanzaboote: fix was upstreamed 2026-04-06 19:21:20 -04:00
274ef40ccc lanzaboote: pin to fork with pcrlock reinstall fix
Upstream PR: https://github.com/nix-community/lanzaboote/pull/566
2026-04-06 16:08:57 -04:00
08486e25e6 gitea: also build laptop 2026-04-06 14:38:21 -04:00
4c04e5b0a2 use my own nix cache 2026-04-06 14:21:43 -04:00
a76a7969d9 nix-cache 2026-04-06 14:21:31 -04:00
4be2eaed35 Reapply "update"
This reverts commit 655bbda26f.
2026-04-06 13:40:52 -04:00
655bbda26f Revert "update"
This reverts commit 960259b0d0.
2026-04-06 13:39:32 -04:00
3b8aedd502 fix hardened kernel with nix sandbox 2026-04-06 13:36:38 -04:00
960259b0d0 update 2026-04-06 13:12:50 -04:00
5fa6f37b28 llama-cpp: disable 2026-04-06 13:12:06 -04:00
7afd1f35d2 xmrig-auto-pause: fix 2026-04-06 13:11:54 -04:00
7e571f4986 update 2026-04-06 13:07:19 -04:00
a12dcb01ec llama-cpp: remove folder 2026-04-06 12:48:28 -04:00
6d47f02a0f llama-cpp: set batch size to 4096 2026-04-06 02:29:37 -04:00
9addb1569a Revert "llama-cpp: maybe use vulkan?"
This reverts commit 0a927ea893.
2026-04-06 02:28:26 -04:00
df04e36b41 llama-cpp: fix vulkan cache 2026-04-06 02:23:29 -04:00
0a927ea893 llama-cpp: maybe use vulkan? 2026-04-06 02:12:46 -04:00
3e46c5bfa5 llama-cpp: use turbo3 for everything 2026-04-06 01:53:11 -04:00
06aee5af77 llama-cpp: gemma 4 E4B -> gemma 4 E2B 2026-04-06 01:24:25 -04:00
8fddd3a954 llama-cpp: context: 32768 -> 65536 2026-04-06 01:04:23 -04:00
0e4f0d3176 llama-cpp: fix model name 2026-04-06 00:59:20 -04:00
4b73e237cb pi: specify anthropic for models 2026-04-06 00:57:36 -04:00
bbcd662c28 xmrig-auto-pause: fix stuck state after external restart, add startup cooldown
Two bugs found during live verification on the server:

1. Stuck state after external restart: if something else restarted xmrig
   (e.g. deploy-rs activation) while paused_by_us=True, the script never
   detected this and became permanently stuck — unable to stop xmrig on
   future load because it thought xmrig was already stopped.

   Fix: when paused_by_us=True and busy, check if xmrig is actually
   running. If so, reset paused_by_us=False and re-stop it.

2. Flapping on xmrig restart: RandomX dataset init takes ~3.7s of intense
   non-nice CPU, which the script detected as real workload and immediately
   re-stopped xmrig after every restart, creating a start-stop loop.

   Fix: add STARTUP_COOLDOWN (default 10s) — after starting xmrig, skip
   CPU checks until the cooldown expires.

Both bugs were present in production: the script had been stuck since
Apr 3 (2+ days) with xmrig running unmanaged alongside llama-server.
2026-04-05 23:20:47 -04:00
324a9123db better organize related monero and matrix services 2026-04-04 14:32:26 -04:00
f96e99ff4d update 2026-04-04 01:52:44 -04:00
d7dd05e028 remove claude-code and claude-code-bridge 2026-04-04 01:52:24 -04:00
8ea96c8b8e llama-cpp: fix model hash 2026-04-04 00:28:07 -04:00
3f62b9c88e grafana: replace custom metric collectors with community exporters
Replace three custom Prometheus textfile collector scripts with
dedicated community-maintained exporters:

- jellyfin-collector.nix (25 LoC shell) -> rebelcore/jellyfin_exporter
  Metric: jellyfin_active_streams -> count(jellyfin_now_playing_state)
  Bonus: per-session labels (user, title, device, codec info)

- qbittorrent-collector.nix (40 LoC shell) -> anriha/qbittorrent-metrics-exporter
  Metric: qbittorrent_{download,upload}_bytes_per_second -> qbit_{dl,up}speed
  Bonus: per-torrent metrics with category/tag aggregation

- intel-gpu-collector.nix + .py (130 LoC Python) -> mike1808/igpu-exporter
  Metric: intel_gpu_engine_busy_percent -> igpu_engines_busy_percent
  Bonus: persistent daemon vs oneshot timer, no streaming JSON parser

All three run as persistent daemons scraped by Prometheus, replacing
the textfile-collector pattern of systemd timers writing .prom files.
Dashboard PromQL queries updated to match new metric names.
2026-04-03 15:38:13 -04:00
479ec43b8f llama-cpp: integrate native prometheus /metrics endpoint
llama.cpp server has a built-in /metrics endpoint exposing
prompt_tokens_seconds, predicted_tokens_seconds, tokens_predicted_total,
n_decode_total, and n_busy_slots_per_decode. Enable it with --metrics
and add a Prometheus scrape target, replacing the need for any external
metric collection for LLM inference monitoring.
2026-04-03 15:19:11 -04:00
37ac88fc0f lib: replace deprecated overrideDerivation with overrideAttrs
overrideDerivation has been deprecated since 2019. The new
overrideAttrs properly handles the env attribute set used by
modern derivations to avoid the NIX_CFLAGS_COMPILE overlap
error between env and top-level derivation arguments.
2026-04-03 15:18:22 -04:00
47aeb58f7a llama-cpp: do logging 2026-04-03 14:39:46 -04:00
daf82c16ba fix xmrig pause 2026-04-03 14:39:20 -04:00
d4d01d63f1 llama-cpp: update + re-enable + gemma 4 E4B 2026-04-03 14:06:35 -04:00
e765a98487 recyclarr: reset back to default basically 2026-04-03 13:45:26 -04:00
124d33963e organize 2026-04-03 00:47:12 -04:00
1451f902ad grafana: re-organize 2026-04-03 00:39:42 -04:00
8e6619097d update 2026-04-03 00:20:13 -04:00
c2ff07b329 llama-cpp: disable 2026-04-03 00:17:38 -04:00
9e235abf48 monitoring: fix disk-usage-collector timer calendar spec 2026-04-03 00:17:21 -04:00
096ffeb943 llama-cpp: xmrig + grafana hooks 2026-04-03 00:17:17 -04:00
ab9c12cb97 llama-cpp: general changes 2026-04-03 00:17:14 -04:00
5e9e6bcd40 pi: fix llama.cpp provider discovery with auth
Add api, authHeader, and discovery.type fields so omp can
discover models via GET /v1/models with the Bearer token.
2026-04-02 18:14:09 -04:00
0aeb6c5523 llama-cpp: add API key auth via --api-key-file
Generate and encrypt a Bearer token for llama-cpp's built-in auth.
Remove caddy_auth from the vhost since basic auth blocks Bearer-only
clients. Internal sidecars (xmrig-pause, annotations) connect
directly to localhost and are unaffected (/slots is public).
2026-04-02 18:02:23 -04:00
bfe7a65db2 monitoring: add zpool and boot partition usage metrics
Add textfile collector for ZFS pool utilization (tank, hdds) and
boot drive partitions (/boot, /persistent, /nix). Runs every 60s.
Add two Grafana dashboard panels: ZFS Pool Utilization and Boot
Drive Partitions as Row 5.
2026-04-02 18:02:23 -04:00
3e35fea183 pi: fix openrouter apiKey, add llama.cpp provider
openrouter was broken: !cat + nix store path is not valid omp config.
Use builtins.readFile to inline the key at eval time.

Add self-hosted llama.cpp provider at llm.sigkill.computer with
Bearer token auth.
2026-04-02 17:57:51 -04:00
e41f869843 trilium: add self-hosted note-taking service
Add trilium-server on port 8787 behind Caddy reverse proxy at
notes.sigkill.computer. Data stored on ZFS tank pool with
serviceMountWithZpool for mount ordering.
2026-04-02 17:44:04 -04:00