- value:'Generating presentation slides with Nix and rst2pdf'
created:
- value:'2025-04-07T00:00:00+00:00'
changed:
- value:'2025-05-11T08:59:58+00:00'
promote:
- value:false
sticky:
- value:false
default_langcode:
- value:true
revision_translation_affected:
- value:true
path:
- alias:/daily/2025/04/07/nix-rst2pdf
langcode:en
body:
- value:|
<p>Since switching to Nix and NixOS, I've been looking for opportunities to use Nix more in addition to managing my laptop and server configurations and creating development shells for projects.</p>
<p>Nix is a build tool, so I've started to use it to build my slide decks which I create using rst2pdf.</p>
<p>I write the rst (reStructuredText) file and compile it to a PDF file.</p>
<p>I had a flake.nix file to add rst2pdf, pdfpc and other tools to my shell, but the compilation to a PDF file was done in a bash script which I've since removed.</p>
devShells.${system}.default = with pkgs; mkShell {
packages = with pkgs; commonBuildInputs ++ [
ghostscript
just
pdfpc
texliveMedium# includes pdfjam
];
};
packages.${system} = {
inherit shared;
}// talks;
};
}
</code></pre>
<p>Each talk is its own derivation, so I can run <code>nix run .#test-driven-drupal</code> and it will generate the appropriate PDF file for me to present or share.</p>
<p>The source code is available at <a href="https://code.oliverdavies.uk/opdavies/talks">https://code.oliverdavies.uk/opdavies/talks</a> if you want to see how I use rst2pdf to create my presentations and I've even <a href="/presentations/building-presenting-slide-decks-rst2pdf">given a presentation about how I create presentations</a>.</p>
format:full_html
processed:|
<p>Since switching to Nix and NixOS, I've been looking for opportunities to use Nix more in addition to managing my laptop and server configurations and creating development shells for projects.</p>
<p>Nix is a build tool, so I've started to use it to build my slide decks which I create using rst2pdf.</p>
<p>I write the rst (reStructuredText) file and compile it to a PDF file.</p>
<p>I had a flake.nix file to add rst2pdf, pdfpc and other tools to my shell, but the compilation to a PDF file was done in a bash script which I've since removed.</p>
devShells.${system}.default = with pkgs; mkShell {
packages = with pkgs; commonBuildInputs ++ [
ghostscript
just
pdfpc
texliveMedium# includes pdfjam
];
};
packages.${system} = {
inherit shared;
}// talks;
};
}
</code></pre>
<p>Each talk is its own derivation, so I can run <code>nix run .#test-driven-drupal</code> and it will generate the appropriate PDF file for me to present or share.</p>
<p>The source code is available at <a href="https://code.oliverdavies.uk/opdavies/talks">https://code.oliverdavies.uk/opdavies/talks</a> if you want to see how I use rst2pdf to create my presentations and I've even <a href="/presentations/building-presenting-slide-decks-rst2pdf">given a presentation about how I create presentations</a>.</p>