+r=http://http.us.debian.org/debian
+# like default, but scrap httpredir, and nonfree.
+# All my systems should be able to get along without nonfree
+# for a base working system afaik.
+dd of=/etc/fai/apt/sources.list <<EOF
+deb $r $base main contrib
+deb http://security.debian.org/debian-security $base/updates main contrib
+EOF
+
+if [[ $base == jessie ]]; then
+ tee -a /etc/fai/apt/sources.list <<'EOF'
+# uncommenting this from the defaults. it's got bug fixes.
+# repository that may contain newer fai packages for jessie
+deb http://fai-project.org/download jessie koeln
+# fix tar https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819978
+deb http://ftp.debian.org/debian jessie-backports main
+EOF
+
+ # note, fai doesn't look at /etc/fai/apt/preferences.d
+ cat >/etc/fai/apt/preferences <<'EOF'
+Package: tar
+Pin: release a=jessie-backports
+Pin-Priority: 500
+EOF
+fi
+