How can I nixos-rebuild on the Pi without getting the error: serialized integer is too large for type?

I’m unable to nixos-rebuild on the Pi.

I’ve found some references to this error, but no solution.

BASHY $ NIX_SSHOPTS="-o RequestTTY=force" nixos-rebuild switch --flake .#pi --target-host b0ef@10.0.0.68 --use-remote-sudo
warning: Git tree '/home/b0ef/repoman/2024-01-31.raspberrypi-nixos-example' is dirty
building the system configuration...
warning: Git tree '/home/b0ef/repoman/2024-01-31.raspberrypi-nixos-example' is dirty
(b0ef@10.0.0.68) Password:
copying 75 paths...
copying path '/nix/store/293hh61g82rgh4kvbv6x11bqqyaw55z5-binutils-2.40-lib' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/4ii7naj8bpfgc1y2lb79n822rpq9k6mb-firmware' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/5q208sbq6yydhmw8c0d7vm4kbsz0qf1k-graphite2-1.3.14' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/5c1lcvrw9f80wasrhsy7gvkrc6sr3d0j-local-cmds' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/559m992nchr7fl3i2zl67x55f71i55d6-gpm-unstable-2020-06-17' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/7xryf3yccz1i8yilw0cqicps2bxg4qcs-jansson-2.14' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/4ibrwiykc3jj2hgybnzaj3wpj067xxdm-libXi-1.8.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/5aa75npm01xjz7q9f14fndlwjmfy0hdc-ncompress-5.0' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/8d108bf94fj6b8j5v7hmly85pg7sj06x-duf-0.8.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/6cp9jdrnp0wsm2lxwxvy2lhmz1q9fvlz-libXfixes-6.0.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/9f39063n8x7qh97zcnn4206x1b623li6-fribidi-1.0.13' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/5vv4bsbcj4kdkvm9vsd8zx9jr6b0zsf6-libdatrie-2019-12-20-lib' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/686qkd0gmdnyl135m5xqsnh3848l3iin-giflib-5.2.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/clrj3m1kaackha4vnd28qb422xhmhp32-unit-systemd-makefs-.service' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/dlj8hm1vvpwimfaj1kj4kyqy4q77a4m1-gmp-6.3.0' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/fhkj0ywv8yp85b0qn685mm92wzlfrsrm-etc-sysctl.d-60-nixos.conf' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/fnqh1d823qg717xgxgnjni446pphq8iy-unit-systemd-fsck-.service' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/jrlbs24v34hprn9vpdkj4gnw085abdgm-libjpeg-turbo-2.1.5.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/cdq6hvignl3ran4dcb23b6afd86y8mx7-pcre-8.45' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/k5wz1hziijwg8rlyr766i3r8j8mp752b-isl-0.20' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/mgqkdf660x631bbidbqsyzl0c4bfynn3-m17n-db-1.8.5' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/fyfb9maxywiayqj64sxl348wr28f664x-libXrender-0.9.11' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/kcb03rg3mgcyvqdkhw0s6q30sbkyy8ap-linux-6.6.6-modules-shrunk' to 'ssh://b0ef@10.0.0.68'...
~& escape not available to multiplexed sessions
copying path '/nix/store/ilslhysr9dpqgjwd31iynmgs68x86xci-libxcb-1.16-dev' to 'ssh://b0ef@10.0.0.68'...
error (ignored): error: interrupted by the user
copying path '/nix/store/n76g3qn71c569h9l47mqm083lcmf2xsl-binutils-2.40' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/k7379ivzxg4m94vg43cj1yvzk2mjvcbj-expand-response-params' to 'ssh://b0ef@10.0.0.68'...
error (ignored): error: interrupted by the user
copying path '/nix/store/p9yqa7sh093rndj4yq7ch0c557ad1ha5-etc-fstab' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/nz212fm1gxpchr6spx73h2wap8casqhz-libXpm-3.5.17' to 'ssh://b0ef@10.0.0.68'...
error: serialised integer 7577342048918991461 is too large for type 'j'

Consequtive tries yields:

BASHY $ NIX_SSHOPTS="-o RequestTTY=force" nixos-rebuild boot --flake .#pi --target-host b0ef@10.0.0.68 --use-remote-sudo
warning: Git tree '/home/b0ef/repoman/2024-01-31.raspberrypi-nixos-example' is dirty
building the system configuration...
warning: Git tree '/home/b0ef/repoman/2024-01-31.raspberrypi-nixos-example' is dirty
(b0ef@10.0.0.68) Password:
copying 35 paths...
copying path '/nix/store/kcb03rg3mgcyvqdkhw0s6q30sbkyy8ap-linux-6.6.6-modules-shrunk' to 'ssh://b0ef@10.0.0.68'...
~& escape not available to multiplexed sessions
error (ignored): std::bad_alloc
error (ignored): basic_string::_M_create
error: serialised integer 7577342048918991461 is too large for type 'j'
1 Like

I found this bug report

, but seriously, this cannot be a general problem, cause then I would’ve found more search results.

No matter what I try, I get that bug on every attempt to run nixos-rebuild on the Pi.

Should I try a reinstall or what can the matter be?:wink: This is bananas…

Having the exact same problem with a VPS instance here. First time I’m trying to set this up though.

I’ve updated my channels and I still see this problem.

I find it hard to understand why I find very little info on this bug, cause this surely can’t just affect the two of us.

EDIT1: Ok, here’s an active bug:

https://github.com/NixOS/nixpkgs/issues/282856

EDIT2: Ok, this workaround mentioned in the bug report seems to work;). That’s just excellent.

error (ignored): error: serialised integer 7308551900590463771 is too large for type 'j'

I already use security.pam.enableSSHAgentAuth and I love it, but it doesn’t help. I thought it’s maybe fish related, but isn’t (made a whole new user with bash as default shell). Maybe starship prompt prints something? I’m kind of too tired to try…