Skip to content

Instantly share code, notes, and snippets.

View flokli's full-sized avatar
🐑
Määh!

Florian Klink flokli

🐑
Määh!
View GitHub Profile
@flokli
flokli / devenv-eval-only.md
Created November 11, 2024 21:02
Sketch on how devenv could use tvix-eval

This document sketches out how devenv could be using Tvix, instead of Nix for Evaluation.

Currently building with Tvix as well is out of scope, but we're fine with Tvix ingesting things in its own (in-memory or semi-ephemeral in a cache directory) store, and copying from there into the "real" Nix store.

Ultimately, devenv evaluates a few attrpaths in a Nix file. As internally fetchTree is used, it being supported in Tvix is a requirement.

Assuming there is fetchTree support, we can evaluate these files with Tvix too.

@flokli
flokli / mitm_nixbld.sh
Created January 8, 2025 19:25
mitmproxy for nix builds
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p minica -p mitmproxy
set -e
echo "Creating CA key and certificate, as well as wildcard cert"
minica -domains '*' || true
echo "Assembling chain.pem"
(openssl x509 -text <./_/cert.pem && openssl x509 -text <./minica.pem && cat ./_/key.pem) > chain.pem