Skip to content

refactor(image): restrict glibc locales to en_US.UTF-8 - #1119

Merged
c-vigo merged 1 commit into
devfrom
feature/1104-image-locales-en-us
Jul 15, 2026
Merged

c-vigo merged 1 commit into
devfrom
feature/1104-image-locales-en-us

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

The image shipped the full 222 MiB glibcLocales archive while only ever setting
en_US.UTF-8. This binds one overridden derivation
(allLocales = false; locales = [ "en_US.UTF-8/UTF-8" ]) and points both
image references at it — the imageTools entry and the LOCALE_ARCHIVE
OCI-config Env interpolation. Fixing only one of the two would have kept the full
archive in the closure via the Env store-path reference (the trap #1104 exists to
avoid).

Evidence

  • .#devkitImageEnv closure: 2.1 GiB → 1.9 GiB
  • nix path-info -r | grep glibc-locales → exactly one path, 2.9 MiB
    (was 222.4 MiB)
  • Full hook suite green (prek run --all-files, exit 0)
  • No other glibcLocales reference exists repo-wide (dev-shell/home module
    unaffected); tests/ locale matches concern dev-shell glibc ABI, not image
    locales — no test changes needed

Part of epic #1103 (sub-issue 1/5). Zero functional change; the overridden
derivation was even substitutable from cache.nixos.org.

Closes #1104

The image shipped the full 222 MiB upstream glibcLocales archive but only
ever sets en_US.UTF-8. Bind one overridden derivation
(allLocales = false; locales = [ "en_US.UTF-8/UTF-8" ]) and use it in BOTH
image references — the imageTools entry AND the LOCALE_ARCHIVE OCI-config
env store-path interpolation — so only one small (~3 MiB) locale path lands
in the closure. Changing only one site would keep both archives, growing the
image. Measured closure drop: ~220 MiB uncompressed, zero functional change.

Refs: #1104
@c-vigo
c-vigo merged commit b890e48 into dev Jul 15, 2026
15 checks passed
@c-vigo
c-vigo deleted the feature/1104-image-locales-en-us branch July 15, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant