diff --git a/flake.nix b/flake.nix
index 9d46e2d..0c484a9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -14,7 +14,14 @@
 
         outputs = [ "out" "tex" ];
 
-        src = ./.;
+        # Only include files that are required for the LaTeX
+        # package so we avoid unnecassary TeX env rebuilds on
+        # changing other parts of the repo like the Nix
+        # infrastructure
+        src = pkgs.lib.sources.sourceByRegex ./. [
+          "^build.lua$"
+          "^tex/.*$"
+        ];
 
         nativeBuildInputs = with pkgs; [
           (texlive.withPackages (ps: with ps; [ l3build ]))