diff options
Diffstat (limited to 'users/flokli/presentations/2024-10-25-nixcon-tvix/default.nix')
-rw-r--r-- | users/flokli/presentations/2024-10-25-nixcon-tvix/default.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/users/flokli/presentations/2024-10-25-nixcon-tvix/default.nix b/users/flokli/presentations/2024-10-25-nixcon-tvix/default.nix new file mode 100644 index 000000000000..88417a4a896a --- /dev/null +++ b/users/flokli/presentations/2024-10-25-nixcon-tvix/default.nix @@ -0,0 +1,35 @@ +{ depot, pkgs, ... }: + +let + inherit (pkgs) + fontconfig qrencode runCommand stdenv; + mkQr = url: runCommand "qrcode.png" { } '' + ${qrencode}/bin/qrencode -o $out -t SVG -s 5 \ + --background=fafafa \ + --foreground=000000 \ + ${url} + ''; +in +stdenv.mkDerivation { + name = "2024-nixcon-tvix"; + src = ./.; + + FONTCONFIG_FILE = pkgs.makeFontsConf { + fontDirectories = with pkgs; [ jetbrains-mono fira fira-code fira-mono lato ]; + }; + + PUPPETEER_EXECUTABLE_PATH = "${pkgs.chromium}/bin/chromium"; + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = "1"; + + nativeBuildInputs = [ pkgs.reveal-md pkgs.graphviz ]; + + buildPhase = '' + cp ${depot.tvix.logo}/logo.png tvix-logo.png + cp ${mkQr "https://flokli.de"} qrcode-flokli.svg + cp ${mkQr "https://tvix.dev"} qrcode-tvix.svg + + mkdir -p $out + reveal-md --static $out presentation.md + reveal-md --print $out/slides.pdf presentation.md + ''; +} |