It was not too hard if you are already familiar with Nix. The features supported (and the custom Linux kernel) can be found in surface-linux. For NixOS I used the nix-hardware flake to simplify things.
The worst part was the compilation of the Linux kernel, that took hours on the surface. Eventually, I used the remote nix build feature to compile on a more capable computer.
He gave an interview where he said he took off the the gloves during that penalty to play mind games on the opponent.