Add a nix-ld aspect for foreign binaries and AppImages

Move programs.nix-ld out of the core aspect into modules/dev/nix-ld.nix
and extend the library set (on top of the module defaults) with the
runtime libraries that prebuilt binaries commonly link or dlopen: C++
runtime, compression and crypto, GL/Vulkan/Wayland, audio, fonts, GTK
and Electron-style helpers, and the X11 client libraries. Enable
programs.appimage with binfmt so .AppImage files run directly through
appimage-run. Import the aspect from the desktop host and document it
in the README.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z
This commit is contained in:
Claude committed 2026-10-13 00:35:45 +00:00
1 parent fbe35f529a
commit b6596250ec
4 files changed
+134 -6

No files matched your search

+14 -3
View File
@@ -21,7 +21,8 @@ is a secondary remote.
- **Full AMD**: AMD CPU, Radeon GPU (Mesa, LACT, optional ROCm).
- **Network**: proxy-suite (zapret, Telegram WebSocket proxy), AmneziaVPN,
NetworkManager with the OpenVPN plugin.
- **Dev**: Docker (rootless and rootful), a Gitea Actions runner, and **Claude
- **Dev**: Docker (rootless and rootful), a Gitea Actions runner, **nix-ld**
and AppImage support for binaries built for other distros, and **Claude
Code** with codebase-memory-mcp, Serena, REA and caveman.
- **Disks via disko, btrfs, no encryption**:
- NVMe: ESP (`/boot`, 2G) + btrfs `nixos` with `@root @home @nix @log @swap`
@@ -49,7 +50,7 @@ modules/ every .nix file below is a flake-parts module (import-tree)
hardware/ amd (CPU, GPU, LACT), rocm (optional, not imported by desktop)
security/ secrets (agenix), ssh (server and client)
network/ vpn (AmneziaVPN), proxy-suite (zapret, Telegram proxy)
dev/ docker, gitea-runner
dev/ docker, gitea-runner, nix-ld (foreign binaries, AppImage)
desktop/ hyprland (+ its Lua files), noctalia, audio, fonts, wezterm, xdg, apps
theme/ stylix: scheme, fonts, cursor, icons, target list
cli/ shell, git, neovim
@@ -463,7 +464,7 @@ What is not hermetic or worth knowing:
- **REA runs from npm**: the first start downloads the pinned version and its
dependencies into `~/.npm` (needs network; the dependency tree is not pinned).
Its prebuilt native binaries rely on `programs.nix-ld` (enabled). REA's skill
Its prebuilt native binaries rely on the `nix-ld` aspect. REA's skill
and caveman are fetched with fixed hashes.
- **Serena writes `.serena/` into every project it activates** (it is in this
repository's `.gitignore`). It is built locally from its lock file, not
@@ -516,6 +517,16 @@ then add `Projects = { };` to `homeFolders` in `modules/hosts/desktop/disks.nix`
**Change a secret**: `cd secrets && agenix -e faumaray-password.age -i ~/.ssh/id_ed25519`
(or run `set-password` / `secret-from-file` again with `--force`), `git add`, switch.
### Foreign binaries (nix-ld, AppImage)
The `nix-ld` aspect (`modules/dev/nix-ld.nix`) runs programs built for other
Linux distributions. nix-ld gives plain ELF binaries a dynamic linker and a broad
library set (`NIX_LD`, `NIX_LD_LIBRARY_PATH`); `.AppImage` files run directly
through `appimage-run` (binfmt). When a binary stops with `error while loading
shared libraries: libfoo.so.N`, add the package that ships it to
`programs.nix-ld.libraries` in that file and switch. AppImages do not use
nix-ld: give them extra libraries through `programs.appimage.package`.
### Verify in a fresh session
From the repository root of a fresh clone or shell (new files must be