You can use 2 spaces after a newline to format it:
let
pkgs = import nixpkgs-old { system = "linux-x86_64"; }
in
pkgs.mkShell { packages = [ pkgs.node ]; }
Combine this with the input statement in the comment below to get a decent flake. You can mix and match multiple inputs if you want to install different versions of packages