nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

commit e85e383aeb8ad092d96906aacca20b692a9d3704
parent e9b0afc41d785ecdb922c7d5fc75cd65f3964783
Author: mtmn <miro@haravara.org>
Date:   Sun, 19 Apr 2026 13:28:31 +0200

chore: update corpus

Diffstat:
Mflake.lock | 26+++++++++++++-------------
Mmodules/mixins/corpus/grafana-dashboard.json | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
Mmodules/services/corpus.nix | 2--
3 files changed, 80 insertions(+), 19 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -30,11 +30,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1776561940, - "narHash": "sha256-O160C3+iYK9z8zC8T4GuSgS5AHs/KmFIyT9aM73wQsY=", + "lastModified": 1776597777, + "narHash": "sha256-gZIDIEyye+J/OW0vd1msQodfjPP7LJhVLOBNHORblH4=", "ref": "refs/heads/master", - "rev": "5a79d44aa19a1858bf26b2f0b970d3964c8eca4d", - "revCount": 121, + "rev": "e7cb4e51e3a7ecd8e1cde6bd20777031d162a63c", + "revCount": 125, "type": "git", "url": "ssh://git@codeberg.org/mtmn/corpus" }, @@ -182,11 +182,11 @@ ] }, "locked": { - "lastModified": 1776454077, - "narHash": "sha256-7zSUFWsU0+jlD7WB3YAxQ84Z/iJurA5hKPm8EfEyGJk=", + "lastModified": 1776562531, + "narHash": "sha256-Lh5Ns9DI67E+lSMOCGK0S+mFPy0mz0yOGiJTUXiR9JI=", "owner": "nix-community", "repo": "home-manager", - "rev": "565e5349208fe7d0831ef959103c9bafbeac0681", + "rev": "5b56ad02dc643808b8af6d5f3ff179e2ce9593f4", "type": "github" }, "original": { @@ -224,11 +224,11 @@ ] }, "locked": { - "lastModified": 1775970782, - "narHash": "sha256-7jt9Vpm48Yy5yAWigYpde+HxtYEpEuyzIQJF4VYehhk=", + "lastModified": 1776575850, + "narHash": "sha256-28Gqz0GDpGsBv8GtAn2dywEQRr+CtTDsD5J7VD6icBE=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "bedba5989b04614fc598af9633033b95a937933f", + "rev": "3b9653a107c736222b5ae0d4036dd3b885219065", "type": "github" }, "original": { @@ -239,11 +239,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1776255774, - "narHash": "sha256-psVTpH6PK3q1htMJpmdz1hLF5pQgEshu7gQWgKO6t6Y=", + "lastModified": 1776329215, + "narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "566acc07c54dc807f91625bb286cb9b321b5f42a", + "rev": "b86751bc4085f48661017fa226dee99fab6c651b", "type": "github" }, "original": { diff --git a/modules/mixins/corpus/grafana-dashboard.json b/modules/mixins/corpus/grafana-dashboard.json @@ -344,17 +344,80 @@ } }, { + "id": 40, + "type": "row", + "title": "Cosine Club", + "gridPos": { "x": 0, "y": 36, "w": 24, "h": 1 }, + "collapsed": false + }, + { + "id": 41, + "type": "timeseries", + "title": "Cosine Requests (per hour)", + "gridPos": { "x": 0, "y": 37, "w": 12, "h": 8 }, + "datasource": { "type": "prometheus", "uid": "DS_PROMETHEUS" }, + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "DS_PROMETHEUS" }, + "expr": "increase(corpus_cosine_requests_total[1h])", + "legendFormat": "{{user}} {{result}}", + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { "lineWidth": 1, "fillOpacity": 10 } + }, + "overrides": [] + }, + "options": { + "tooltip": { "mode": "multi", "sort": "none" }, + "legend": { "displayMode": "list", "placement": "bottom" } + } + }, + { + "id": 42, + "type": "stat", + "title": "Cosine Requests by Result", + "gridPos": { "x": 12, "y": 37, "w": 12, "h": 8 }, + "datasource": { "type": "prometheus", "uid": "DS_PROMETHEUS" }, + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "DS_PROMETHEUS" }, + "expr": "sum by (result) (corpus_cosine_requests_total)", + "legendFormat": "{{result}}", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "short", + "color": { "mode": "fixed", "fixedColor": "blue" } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { "calcs": ["lastNotNull"] }, + "orientation": "auto", + "textMode": "auto", + "colorMode": "value", + "graphMode": "none" + } + }, + { "id": 30, "type": "row", "title": "Runtime", - "gridPos": { "x": 0, "y": 27, "w": 24, "h": 1 }, + "gridPos": { "x": 0, "y": 45, "w": 24, "h": 1 }, "collapsed": false }, { "id": 31, "type": "timeseries", "title": "Event Loop Lag", - "gridPos": { "x": 0, "y": 28, "w": 8, "h": 8 }, + "gridPos": { "x": 0, "y": 46, "w": 8, "h": 8 }, "datasource": { "type": "prometheus", "uid": "DS_PROMETHEUS" }, "targets": [ { @@ -392,7 +455,7 @@ "id": 32, "type": "timeseries", "title": "Memory", - "gridPos": { "x": 8, "y": 28, "w": 8, "h": 8 }, + "gridPos": { "x": 8, "y": 46, "w": 8, "h": 8 }, "datasource": { "type": "prometheus", "uid": "DS_PROMETHEUS" }, "targets": [ { @@ -430,7 +493,7 @@ "id": 33, "type": "timeseries", "title": "GC Duration Rate", - "gridPos": { "x": 16, "y": 28, "w": 8, "h": 8 }, + "gridPos": { "x": 16, "y": 46, "w": 8, "h": 8 }, "datasource": { "type": "prometheus", "uid": "DS_PROMETHEUS" }, "targets": [ { diff --git a/modules/services/corpus.nix b/modules/services/corpus.nix @@ -53,8 +53,6 @@ in { CORPUS_USERS_FILE = "${users}"; DATABASE_PATH = cfg.dataDir; METRICS_ENABLED = "true"; - OTEL_SERVICE_NAME = "corpus"; - OTEL_EXPORTER_OTLP_ENDPOINT = "http://127.0.0.1:4318"; }; serviceConfig = {