blumeops/containers/valkey/default.nix
Erich Blume 02859c55d1 C1(valkey-nix): add nix-built amd64 variant for ringtail/immich
`containers/valkey/container.py` builds Alpine 3.22 arm64 on the indri
k8s runner (used by paperless). Adding `containers/valkey/default.nix`
gives us an amd64 image built via nix on the ringtail
nix-container-builder, so immich-ringtail can stop pulling the upstream
`docker.io/valkey/valkey` multi-arch image.

Both builds track upstream valkey 8.1.x; bumping to 8.1.7 (Alpine 3.22
ships 8.1.7-r0, nixpkgs ships 8.1.7) — version-check now reports
`container.py=8.1.7, nix=8.1.7, service-versions=8.1.7`.

A follow-up commit on this branch will swap the immich-ringtail and
paperless kustomization tags once both builds succeed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 10:21:02 -07:00

30 lines
854 B
Nix

# Nix-built Valkey for ringtail (amd64)
# Companion to container.py (Alpine 3.22, arm64 on indri).
# Used by immich-ringtail which needs an amd64 image; paperless on indri
# continues to use the Alpine container.py build.
#
# The version assertion ensures nix-build fails if a flake.lock update
# changes the Valkey version — forcing an explicit version acknowledgment
# here and in service-versions.yaml (enforced by container-version-check).
{ pkgs ? import <nixpkgs> { } }:
let
version = "8.1.7";
in
assert pkgs.valkey.version == version;
pkgs.dockerTools.buildLayeredImage {
name = "blumeops/valkey";
contents = [
pkgs.valkey
];
config = {
Entrypoint = [ "${pkgs.valkey}/bin/valkey-server" ];
Cmd = [ "--bind" "0.0.0.0" "--protected-mode" "no" "--dir" "/data" ];
ExposedPorts = {
"6379/tcp" = { };
};
};
}