This is a simple nix flake to generate a quarto book. It is inspired by this repo which builds a quarto book using nix. However, that package uses R, and does not use flakes which is the standard I prefer.
- Based on the basic quarto book project.
- Uses devenv to generate a development shell with quarto, a reasonable version of texlive, and some necessary dependencies.
- Configures a python virtual environment, managed by uv for ease of use.
- Note: Since it's using
nix
, there might be incompatibilities with certain packages even when usinguv
. It is still the best option I know so far to usepython
in a simple manner.
- Note: Since it's using
- Build PDF file and HTML on CI/CD pipeline.
- Automatic publishing is not automatically set.
- Artifacts are collected! Check
.github/workflows/build.yml
.
This github repository is based on a nix flake, so it is assumed that nix is installed in your system. If not, then I would recommend installing lix, a community-developed fork of nix. Alternatively, you might want to try using the main nix installer. Another popular installer is the Determinate Systems installer.
Nix flakes are still considered an experimental feature, but have been widely accepted in the community. Follow these instructions if your installation does not enable flakes by default.
First clone and enter the repository
git clone [email protected]:AlejandroGomezFrieiro/quarto_nix_book.git; cd quarto_nix_book
If you have direnv
installed, then just allow it with direnv allow
. Otherwise, you need to run
nix develop --no-pure-eval
Then use quarto and python as usual.
I would like to make this repository more general by adding several templates for articles, websites etc. As well as using uv2nix
instead of devenv
to setup the python environment. But the current way it is setup is sufficient for myself.
MIT License.