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
- Ensure that your nixpkgs channel is up to date. This repository's
flake pins
nixpkgs-unstable; non-flake users need a nixpkgs withpkgsCross.remarkable1andpkgsCross.remarkable2.
$ nix eval -f '<nixpkgs>' 'pkgsCross.remarkable1.stdenv.hostPlatform.config'
$ nix eval -f '<nixpkgs>' 'pkgsCross.remarkable2.stdenv.hostPlatform.config'
-
Create a non-root user on the tablet, e.g.
useradd siraben && passwd siraben. Ensure that you have passwordless SSH set up by usingssh-copy-id. -
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
-
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 toheadin the script aren't available on the default binary available on the reMarkable. -
Using
nix-buildandnix-copy-closure, one can cross-build from their machine and transfer it to the tablet, like so. TheNIX_SSHOPTSis needed becausenixisn't available unless.profileis 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:
- appmarkable
- chessMarkable
- evkill
- gst-libvncclient-rfbsrc
- mxc_epdc_fb_damage
- plato
- rM-vnc-server
- remarkable-fractals
- remarkable_news
- retris
- rm-video-player
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-rfbsrcrm1Pkgs.appmarkablerm1Pkgs.chessmarkablerm1Pkgs.evkillrm1Pkgs.platorm1Pkgs.rM-vnc-serverrm1Pkgs.remarkable-fractalsrm1Pkgs.remarkable_newsrm1Pkgs.retrisrm1Pkgs.rm-video-playerrm2Pkgs.appmarkablerm2Pkgs.chessmarkablerm2Pkgs.evkillrm2Pkgs.platorm2Pkgs.rM-vnc-serverrm2Pkgs.remarkable-fractalsrm2Pkgs.remarkable_newsrm2Pkgs.retrisrm2Pkgs.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.