Nix SerialisationError, not able to use nix-build, nix-shell, home-manager switch

Hi, I’m actually trying to build a package, but I noticed that I cannot build it, given that error :

error: error: --- SerialisationError --- nix-daemon
non-zero padding

That comes from my user directly, because I can successfully run nix-build or nixos-rebuild using root user, whereas almost all nix commands throw me that error. The status of nix-daemon.service is actually active without any error, I also tried to reboot my computer, still the same error. My laptop is like unusable haha

Are you on nixUnstable? This is a known problem that should’ve been fixed in nixUnstable: 2.4pre20200719_a79b6dd -> 2.4pre20200721_ff314f1 · NixOS/nixpkgs@85819d4 · GitHub (at least that fixed it on my laptop).

You can roll back to a working system configuration with sudo nixos-rebuild switch --rollback btw.

I was haha, I switched to stable branch and it seems to work so far, thank you!