Skip to content

Instantly share code, notes, and snippets.

View Mic92's full-sized avatar
๐Ÿ˜‰

Jรถrg Thalheim Mic92

๐Ÿ˜‰
View GitHub Profile
@Mic92
Mic92 / README.md
Last active September 30, 2026 08:08
SeaweedFS filer patch: answer cache misses from a remote key index (niks3/nix-grpc-store binary cache)

SeaweedFS filer patch plus the NixOS deployment of the gateway, for a niks3 binary cache on an S3 bucket.

Problem

The bucket is mounted into the SeaweedFS filer as a remote mount, and niks3 talks S3 to the gateway instead of the provider. Every cache miss under the mount then makes the filer HEAD the object in the bucket. Most misses are names that do not exist at all โ€” clients probing narinfos they might already have, paths GC collected โ€” and providers rate limit those requests, so a busy cache returns errors instead of misses. As all writes go through

@Mic92
Mic92 / _README.md
Created July 8, 2026 07:13
CLI search for search.nixos.org ES backend with improved ranking

nix-search.py

Command-line search for search.nixos.org's Elasticsearch backend (nixos-search). Python 3 stdlib only.

Builds the same query as the web frontend, plus ranking tweaks (disable with --upstream-ranking):

  • Exact/prefix boost on the attribute name: gcc, docker rank first.
@Mic92
Mic92 / README.md
Last active April 30, 2026 10:50
buildbot-nix-www hybrid mockup

buildbot-nix โ€” hybrid mockup (freestyle redesign)

This iteration deviates from the original spec in service of a more cohesive, less cluttered design. The earlier hybrid kept the spec's multi-section page structure (phase chevrons, separate Build-failures section, Logs tab, etc.). This redesign collapses the run page to a single expandable table, drops the secondary sticky sub-header, and repurposes derivation.html.

Both themes work via Tailwind dark: classes. Theme toggle persists

@Mic92
Mic92 / README.md
Created April 20, 2026 20:11
NixOS/nix#15711 bug reproducers: builtins.storePath + stale stat cache

PR #15711 bug reproducers

NixOS/nix#15711

Each script is self-contained. Set $NIX to the PR's nix binary (defaults to nix from PATH).

export NIX=/path/to/pr15711/nix
./bug1-storePath.sh
@Mic92
Mic92 / README.md
Last active March 27, 2026 09:56
flake.nix vs shell.nix adoption survey on GitHub (2026-03)

flake.nix vs shell.nix on GitHub โ€” Adoption Report

Generated by: nix-flake-survey.py Sample size: 300 / 300 repos

Raw Totals (root-level)

File Count
shell.nix 14,032
@Mic92
Mic92 / commit-visualization.html
Last active March 12, 2026 19:21
Visualization of commit 47d2d18: Make computeClosure async (Nix)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>computeClosure async โ€” State Machine & Sequence Diagrams</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #0d1117; color: #c9d1d9; padding: 32px 48px; }
h1 { color: #58a6ff; font-size: 1.4em; margin-bottom: 4px; }
@Mic92
Mic92 / bench-copy-README.md
Last active March 12, 2026 16:38
Benchmark: nix copy to local store โ€” base (sequential) vs new (parallel addMultipleToStore)

Benchmark: parallel addMultipleToStore for nix copy

Measures the performance impact of parallelizing LocalStore::addMultipleToStore (writing store paths to disk in parallel via a thread pool, then registering in a single SQLite transaction) vs the base sequential implementation.

Test closure: Firefox โ€” ~372 paths, ~1.6GB total.

Setup

@Mic92
Mic92 / flake.lock
Created March 5, 2026 09:43
Reproducer for numtide/llm-agents.nix#2979 - works fine, cannot reproduce the electron_40 error
{
"nodes": {
"blueprint": {
"inputs": {
"nixpkgs": [
"llm-agents",
"nixpkgs"
],
"systems": "systems"
},
@Mic92
Mic92 / .envrc
Last active February 19, 2026 11:47
Run Phi-3 Mini on a local CUDA GPU with NixOS + direnv
use nix
@Mic92
Mic92 / authelia-declarative-users.nix
Last active December 30, 2025 20:33
Declarative Authelia users for NixOS - secrets resolved at runtime
# Declarative Authelia users with secret file references
# Secrets are resolved at service start, never stored in the Nix store
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.authelia.instances.main.declarativeUsers;