#!/bin/sh
#
# Writes the final sources.list file
#

CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
RELEASE="bookworm"

cat << EOF > $CHROOT/etc/apt/sources.list
# This system was installed using PeppermintOS removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were removed at the end of the installation process.
# For information about how to configure apt package sources,
# See https://wiki.debian.org/SourcesList for more information.

# Main Repo - main contrib non-free
deb http://deb.debian.org/debian $RELEASE main main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian $RELEASE main contrib non-free non-free-firmware

# Updates Repo - main contrib non-free
deb http://deb.debian.org/debian $RELEASE-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian $RELEASE-updates main contrib non-free non-free-firmware

# Security Repo - main contrib non-free
deb http://security.debian.org/debian-security/ $RELEASE-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security/ $RELEASE-security main contrib non-free non-free-firmware

# Backports allow you to install newer versions of software made available for this release
deb http://deb.debian.org/debian $RELEASE-backports main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian $RELEASE-backports main contrib non-free non-free-firmware

EOF

exit 0
