Done: reMarkable1 cross-compile toolchain for Nix

@Manveru curious how you did it: I’ve got a remarkble 2 with this week update to 2.26 . Install of nix fails because of invalid option -- 'c'

reMarkable: ~/nix-2.3.7pre0_0000000-armv7l-linux/ ./install-multi-user   
...
We will:

 - make sure your computer doesn't already have Nix files
   (if it does, I will tell you how to clean them up.)
 - create local users (see the list above for the users we'll make)
 - create a local group (nixbld)
 - install Nix in to /nix
 - create a configuration file in /etc/nix
 - set up the "default profile" by creating some Nix-related files in
   /home/root
 - load and start a service (at /etc/systemd/system/nix-daemon.service
   and /etc/systemd/system/nix-daemon.socket) for nix-daemon

Ready to continue?
[y/n] y

head: invalid option -- 'c'
BusyBox v1.31.1 (2020-12-17 19:42:00 UTC) multi-call binary.

Usage: head [OPTIONS] [FILE]...
head: invalid option -- 'c'
BusyBox v1.31.1 (2020-12-17 19:42:00 UTC) multi-call binary.

Usage: head [OPTIONS] [FILE]...

It seems that the install script is not POSIX compliant: there’s no -c option in POSIX head (c.f. head).
There are only a couple of occurences of head -c in the script, and mainly for display purposes. I believe you can replace these with head -n 1 and get roughly the same experience.

However, there’s another issue that I am confused by.

@siraben, what is the point of creating another non-root user?

Also, with which user do you install nix with? root?
It seems that sudo is not installed on the rM2 out of the box…

My guess is that you installed with root, and did a multi-user install. Am I correct?

The Nix installer needs to be installed with a non-root user. Yes, I installed Nix as that non-root user and did a multi-user install.

1 Like