This guide is for users of the Nix package manager and assumes you have a Ledger Nano S updated with the latest firmware (at this time 1.4.2).
NOTE If you are not on NixOS, skip the sections which have NixOS at the start of the heading.
To hasten the build process (it could take days to build without this), add the following to /etc/nixos/configuration.nix
if you are on NixOS.