See "Organising dotfiles in a git repository" for more info.
Cloning the dotfiles:
$ alias h="env GIT_WORK_TREE=$HOME GIT_DIR=$HOME/.files.git"
$ h git init
$ h git remote add origin https://github.com/kylef/dotfiles.git
$ h git fetch
$ h git checkout master
Installing tools:
$ nix run home-manager/master switch