Nixos-generate-config
This command analyzes your hardware configuration and generates two files of: configuration.nix hardware-configuration.nix
Notes:
If you are using an SSD it may be useful to enable TRIM support as well as set filesystem flags to improve the SSD performance:
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
(apologies have no idea how to format the above...)