Hey everyone,
I’ve been working on a little side project during my time off, and I wanted to share it with the community.
I often present technical topics at work, but I’ve never liked PowerPoint, Google Slides, and similar tools. As a Nix enthusiast and Kubernetes/DevOps lead, it always feels clumsy to rely on WYSIWYG editors. It’s not code, it’s not reproducible: it’s a liability.
I found Marp a few years back and immediately adopted it to write and generate my slides. But I found myself constantly copying assets, snippets, and themes back and forth between presentations. I also always had to dig through online documentation or CLI help commands to remember how to do anything. And ultimately, without a pinned toolchain, it still wasn’t truly reproducible. Frustrating.
To solve this once and for all, I put together Marp Deck Directory, a public template that combines Marp with the absolute guarantees of Nix flakes. The goal is to store all your slide decks and assets in one place, and be guaranteed you can generate them identically 5 years from now.
Live Demo (built via GH Actions): Marp Deck Directory Introduction
The core of the project is a single derivation which dynamically discovers decks under the slides/ directory and builds them into HTML or PDF. It also dynamically generates cover images for your decks (either taken from the first slide or a dedicated Markdown file). The derivation handles intelligent path rewriting so you can seamlessly mix global assets (/assets) and deck-specific local assets without breaking local dev previews.
Because Nix builds run without network access, everything must be available offline, so I built a small derivation to vendor Twemoji assets locally during the build (during local dev preview, it just uses the online version).
I also had to create a small wrapper around the Brave browser (which is Chromium-based) to disable sandboxing (--no-sandbox), since normal sandboxing fails inside isolated Nix builds. Why Brave, you ask? Because Chromium isn’t natively available on aarch64-darwin, and headless Firefox currently struggles on Darwin (plus Marp rendering on Firefox differs from Chromium). So Brave was the safest cross-platform bet, though you can easily swap it for any Chromium-based browser.
Oh, one last thing! The template comes bundled with Catppuccin themes for Marp, which I built specifically for this project and is currently in the process of being handed over to the Catppuccin organization as an official port!
I’d love to get feedback from the community on the derivation structure (specifically in pkgs/slides.nix where the deck discovery and path rewriting happens). Let me know what you think! And if you wish to use this template, I’d love to hear about it!