cd /
dpkg --get-selections >>installed_packages
git init
git add installed_packages /etc /home/*/.* /root /whateverneeded
git commit -m "system init"
on a new system just copy over the .git folder
install packages from installed_packages, then git checkout
reboot
that's all :D
or there is chef, puppet