Compare commits

..

6 Commits

Author SHA1 Message Date
Tom Alexander
3eb18a24bc Merge branch 'cache_nix_build'
Some checks failed
semver Build semver has succeeded
build-staging Build build-staging has failed
build Build build has succeeded
2026-10-23 20:58:01 -04:00
Tom Alexander
95a6a3eaa2 Separate out the install of dependencies so they can be cached as docker layers before the homepage source code is copied in. 2026-10-23 20:57:20 -04:00
Tom Alexander
433b52768a Fix image links.
All checks were successful
semver Build semver has succeeded
build-staging Build build-staging has succeeded
build Build build has succeeded
Canonicalizing in the nix build was causing the image links to reference the nix build path. By switching to lexical normalization, the paths are being properly calculated.
2026-10-21 18:58:14 -04:00
Tom Alexander
5adcc9f815 Merge branch 'buildah'
All checks were successful
semver Build semver has succeeded
build-staging Build build-staging has succeeded
build Build build has succeeded
2026-10-20 23:18:28 -04:00
Tom Alexander
1d85d907ac Switch main build of homepage to buildah. 2026-10-20 23:18:20 -04:00
Tom Alexander
95c149cf5b Switch staging build of homepage to buildah. 2026-10-20 23:18:20 -04:00
5 changed files with 18 additions and 6 deletions

View File

@@ -70,6 +70,7 @@ spec:
script: | script: |
#!/usr/bin/env sh #!/usr/bin/env sh
set -euo pipefail set -euo pipefail
export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=accept-new"
git fetch --tags git fetch --tags
current_tag=$(git tag --points-at HEAD --list 'v*.*.*') current_tag=$(git tag --points-at HEAD --list 'v*.*.*')
if [ -z "$current_tag" ]; then if [ -z "$current_tag" ]; then

View File

@@ -15,9 +15,13 @@ EOF
RUN cp "$(nix build nixpkgs#cacert --print-out-paths)/etc/ssl/certs/ca-bundle.crt" /tmp/ca-bundle.crt RUN cp "$(nix build nixpkgs#cacert --print-out-paths)/etc/ssl/certs/ca-bundle.crt" /tmp/ca-bundle.crt
COPY . /tmp/build COPY flake.nix flake.lock /tmp/build
WORKDIR /tmp/build WORKDIR /tmp/build
RUN --mount=type=ssh GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" nix build --no-link '.#dependencies'
COPY . /tmp/build
RUN --mount=type=ssh GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" nix build '.#docker_env' RUN --mount=type=ssh GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" nix build '.#docker_env'
# Export the built closure to a folder # Export the built closure to a folder

8
flake.lock generated
View File

@@ -8,11 +8,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1784333070, "lastModified": 1792617478,
"narHash": "sha256-3WkxaHOS13vFBtQFBmGIPScQZDNLk5bqCAY9qBJASl0=", "narHash": "sha256-ctFfFI7qlZxv6s8nznps7KYp/QQ1zzbMKCgLtl7YYRA=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "faf279292ad20783775d909b96815f7ca2843b85", "rev": "1c369e4b25caf4dd9a962340a770fbd6e543820a",
"revCount": 327, "revCount": 331,
"type": "git", "type": "git",
"url": "https://code.fizz.buzz/talexander/natter.git" "url": "https://code.fizz.buzz/talexander/natter.git"
}, },

View File

@@ -74,6 +74,11 @@
inherit (appliedOverlay.homepage) inherit (appliedOverlay.homepage)
release release
; ;
dependencies = pkgs.symlinkJoin {
# This is to enable the docker image to install all the dependencies, cache that layer, and then build the final site after the org source files have been loaded. Without this, every update to the blog posts would result in recompiling everything.
name = "homepage-dependencies";
paths = appliedOverlay.homepage.dependencies;
};
docker_env = pkgs.stdenv.mkDerivation { docker_env = pkgs.stdenv.mkDerivation {
pname = "homepage-docker-env"; pname = "homepage-docker-env";
version = "0.0.0"; version = "0.0.0";
@@ -100,14 +105,16 @@
natter' = (natter.overlays.default final final).natter.release; natter' = (natter.overlays.default final final).natter.release;
organic_ast_explorer' = organic_ast_explorer' =
(organic_ast_explorer.overlays.default final final).organic_ast_explorer.release; (organic_ast_explorer.overlays.default final final).organic_ast_explorer.release;
release = homepageScope.callPackage ./nix/package.nix { dependencies = {
natter = natter'; natter = natter';
organic_ast_explorer = organic_ast_explorer'; organic_ast_explorer = organic_ast_explorer';
inherit homepage_private; inherit homepage_private;
}; };
release = homepageScope.callPackage ./nix/package.nix dependencies;
in in
{ {
inherit release; inherit release;
dependencies = (builtins.attrValues dependencies);
} }
); );
}; };