Skip to content

NixAppImage

NixAppImage is an AppImage created using a Nix bundler. It packages NixOS derivations as portable AppImages.

pkg_type: nixappimage

Features

  • Built-in sandboxing (run SHOW_HELP=1 to see options)
  • Absolute portability — includes all dependencies from Nix
  • Reproducible builds via Nix
  • Sources packages from nixpkgs

Prerequisites

  • FUSE — required for mounting
  • Fonts — for rendering non-Latin characters and emojis
  • User Namespaces — required for sandboxing

Known Issues

WARNING

  • LibGL: Hardware-accelerated OpenGL may not work. See nixpkgs#9415.
  • Size: NixAppImages are 2-5x larger than other formats because they bundle the complete Nix dependency closure. This is the trade-off for absolute portability.

Quirks

DANGER

  • Never run strip, objcopy, or any binary rewriting tool on NixAppImages. They will destroy the embedded squashfs|dwarfs archive, leaving only the runtime stub.
  • A .nixappimage file is not a real ELF binary.

Example SBUILD

yaml
#!/SBUILD
_disabled: false

pkg: "myapp"
pkg_id: "github.com.user.myapp"
pkg_type: "nixappimage"
ghcr_pkg: "user/myapp"
description: "My app (NixAppImage)"
provides:
  - "myapp"
src_url:
  - "https://github.com/user/myapp"
x_exec:
  host:
    - "aarch64-linux"
    - "x86_64-linux"
  shell: "bash"
  pkgver: |
    curl -qfsSL "https://api.github.com/repos/user/myapp/releases/latest" | jq -r '.tag_name'
  run: |
    soar dl "https://github.com/user/myapp" --match "nixappimage" -o "./${PKG}" --yes

See Also

Released under the MIT License.