From f93ee7f6eeb67044cf23801a2205f4f43db3900d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Thu, 10 Sep 2026 12:59:31 -0700 Subject: [PATCH] fix: build with zola 0.23 via anemone's tera-v2 migration nixpkgs bumped zola from 0.22.1 to 0.23.4, described upstream as "probably the most breaking version of Zola that will happen" -- it removed shortcodes and migrated Tera to v2. The `anemone` theme hadn't been updated for it, so builds failed with `Unknown filter 'escape'` and `Block 'head' is not defined in any parent template`. zola 0.23 also dropped its native-tls fallback, so its now-mandatory rustls client panics building a client without a CA bundle ("No CA certificates were loaded from the system") on Linux, since the Nix sandbox has no /etc/ssl/certs and nothing previously set SSL_CERT_FILE. Point it at nixpkgs' cacert bundle. Speyll/anemone#41 migrates the theme for zola 0.23/Tera v2 but isn't merged yet, so pin to that branch directly. It adds a `head` block to the theme's own base.html for per-page SEO tags, but this site overrides base.html with its own, so add the same block there. Also drop x86_64-darwin from `systems`: nixpkgs 26.11 (needed for zola 0.23) dropped support for it, which broke `nix build`/`nix flake check` entirely once nixpkgs was bumped, since flake-parts evaluates `formatter` for every declared system regardless of which one is requested. --- flake.lock | 17 +++++++++-------- flake.nix | 7 +++++-- package.nix | 2 ++ templates/base.html | 1 + 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index f9f44cf..1b01feb 100644 --- a/flake.lock +++ b/flake.lock @@ -3,16 +3,17 @@ "anemone": { "flake": false, "locked": { - "lastModified": 1753053308, - "narHash": "sha256-vyB7gLKzTFLSEPPD4ylc3Uyj3WeKRFFklEnE58jn5JA=", - "owner": "Speyll", + "lastModified": 1787795794, + "narHash": "sha256-PjluJK5TJ6A5MPhrStJO24kknPeMACFRWJl1alBnogU=", + "owner": "PinkNoize", "repo": "anemone", - "rev": "47b2085cb01f0e82fd83221aad79ab0b3d1702e0", + "rev": "8c1bae458ae24ac5fe0ff14706a463b51bf429e5", "type": "github" }, "original": { - "owner": "Speyll", + "owner": "PinkNoize", "repo": "anemone", + "rev": "8c1bae458ae24ac5fe0ff14706a463b51bf429e5", "type": "github" } }, @@ -38,11 +39,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1769018530, - "narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=", + "lastModified": 1789006805, + "narHash": "sha256-xB8mKMOx1IA9vTDNLmJZ6n4wCMq/cuWBBOzGCRnqxrU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "88d3861acdd3d2f0e361767018218e51810df8a1", + "rev": "8ce4ef6cb6f871616146b9fe26d2a5ae594e94fe", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9e0fc83..b478f8c 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,9 @@ inputs.nixpkgs-lib.follows = "nixpkgs"; }; anemone = { - url = "github:Speyll/anemone"; + # Pinned to PinkNoize's zola-0.23/Tera-v2 migration until it's merged + # upstream: https://github.com/Speyll/anemone/pull/41 + url = "github:PinkNoize/anemone/8c1bae458ae24ac5fe0ff14706a463b51bf429e5"; flake = false; }; }; @@ -40,7 +42,8 @@ ); nixosModules.default = self.nixosModules.zx-dev; }; - systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"]; + # x86_64-darwin dropped from nixpkgs 26.11; drop it here too. + systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin"]; perSystem = { pkgs, self', diff --git a/package.nix b/package.nix index f0abcbf..23e9026 100644 --- a/package.nix +++ b/package.nix @@ -1,6 +1,7 @@ { self, stdenv, + cacert, pkgs, anemone, }: let @@ -19,6 +20,7 @@ in name = "zx.dev"; src = ./.; buildInputs = [pkgs.zola]; + SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; buildPhase = "zola build"; installPhase = '' mkdir -p $out diff --git a/templates/base.html b/templates/base.html index 38be2d8..7d71084 100644 --- a/templates/base.html +++ b/templates/base.html @@ -30,6 +30,7 @@ + {% block head %}{% endblock %}