My NixOS configuration.
Clone the repository to some directory. /etc/nixos/git in this example.
/etc/nixos/git
Set up configuration.nix:
configuration.nix
{ ... }: { imports = [ ./hardware-configuration.nix ./git/machines/[machine].nix ]; }