Nix cross-compilation to the reMarkable tablet

May 13, 2026 ยท View on GitHub

This flake builds on the reMarkable cross-compile targets that are now in Nixpkgs. Package sets for both devices are exposed as rm1Pkgs.<package> and rm2Pkgs.<package> flake attributes, and the overlay extends pkgsCross.remarkable1 and pkgsCross.remarkable2 instead of carrying a separate reMarkable SDK toolchain.

Cross-compiling using Nixpkgs infrastructure

  1. Ensure that your nixpkgs channel is up to date. This repository's flake pins nixpkgs-unstable; non-flake users need a nixpkgs with pkgsCross.remarkable1 and pkgsCross.remarkable2.
$ nix eval -f '<nixpkgs>' 'pkgsCross.remarkable1.stdenv.hostPlatform.config'
$ nix eval -f '<nixpkgs>' 'pkgsCross.remarkable2.stdenv.hostPlatform.config'
  1. Create a non-root user on the tablet, e.g. useradd siraben && passwd siraben. Ensure that you have passwordless SSH set up by using ssh-copy-id.

  2. The root partition on the tablet has very limited space (22 MB), so, as root, mkdir -p /nix /opt/nix && mount --bind /opt/nix /nix. The bind can be made persistent by adding the following line to /etc/fstab

/opt/nix /nix none bind,nofail 0,0
  1. Install Nix on the device. To do this, fetch the latest armv7l-linux Nix build from https://hydra.nixos.org/jobset/nix/master, then un-tar it (tar -xf ...) and run the installation script. For the multi-user installation, you may have to upgrade busybox or edit the script, as the flags provided to head in the script aren't available on the default binary available on the reMarkable.

  2. Using nix-build and nix-copy-closure, one can cross-build from their machine and transfer it to the tablet, like so. The NIX_SSHOPTS is needed because nix isn't available unless .profile is sourced.

$ NIX_SSHOPTS="source .profile;" nix-copy-closure --to siraben@10.11.99.1 "$(nix build -f '<nixpkgs>' pkgs.pkgsCross.remarkable1.hello)"

Happy hacking!

Building This Repository

Clone and navigate to this repository and run the following to cross-compile retris to each tablet generation. If you want to use the binary cache, run cachix use nix-remarkable first.

nix build .#rm1Pkgs.retris
nix build .#rm2Pkgs.retris

Description

This repository carries Nix expressions for reMarkable tools and uses Nixpkgs' reMarkable cross infrastructure to build them. The added benefits are:

  • cross-compiling up to 60,000+ additional packages from Nixpkgs
  • reproducible builds and deployment, check out the GitHub actions artifacts in this repository
  • takes advantage of benefits from source and binary deployment by using Nix and a binary cache
  • allows macOS users to cross-compile to the tablet when used in conjunction with nix-docker

Currently, it includes Nix expressions for various tools, including:

To build a local copy of the above packages, create a pkgs/ directory, clone the relevant repository into it, and run nix build in the resulting subdirectory.

To build release copies of any of the projects, run nix build .#<attribute> from this repo. The flake exposes:

  • hostPkgs.gst-libvncclient-rfbsrc
  • rm1Pkgs.appmarkable
  • rm1Pkgs.chessmarkable
  • rm1Pkgs.evkill
  • rm1Pkgs.plato
  • rm1Pkgs.rM-vnc-server
  • rm1Pkgs.remarkable-fractals
  • rm1Pkgs.remarkable_news
  • rm1Pkgs.retris
  • rm1Pkgs.rm-video-player
  • rm2Pkgs.appmarkable
  • rm2Pkgs.chessmarkable
  • rm2Pkgs.evkill
  • rm2Pkgs.plato
  • rm2Pkgs.rM-vnc-server
  • rm2Pkgs.remarkable-fractals
  • rm2Pkgs.remarkable_news
  • rm2Pkgs.retris
  • rm2Pkgs.rm-video-player

To develop your own packages for the reMarkable, use the rmPkgs attribute of the set computed in default.nix for reMarkable 1 compatibility, or use rm1Pkgs and rm2Pkgs explicitly when the target generation matters.