first commit

This commit is contained in:
julien
2026-03-15 19:58:46 +01:00
commit bbc4e4da65
32 changed files with 1854 additions and 0 deletions

4
roles/base/l10n.packages Normal file
View File

@@ -0,0 +1,4 @@
L10N_MAP_PKGS=(
"firefox-esr::firefox-esr-l10n"
"libreoffice::libreoffice-l10n"
)

11
roles/base/packages.list Normal file
View File

@@ -0,0 +1,11 @@
ROLE_PACKAGES=(
"ca-certificates"
"curl"
"git"
"gnupg"
"htop"
"rsync"
"tree"
"ufw"
"wget"
)

47
roles/base/repo.sh Executable file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env bash
# Configure les dépôts Debian de base
source "$PROJECT_DIR/lib.sh"
enable_strict_mode
cat <<'EOM'
=> Base APT configuration
EOM
KEY_URL="https://ftp-master.debian.org/keys/archive-key-12.asc"
KEYRING="/usr/share/keyrings/debian-archive-keyring.pgp"
SOURCES="/etc/apt/sources.list.d/debian.sources"
read -r -d '' CONTENT <<EOM || true
Types: deb
URIs: https://deb.debian.org/debian
Suites: trixie trixie-updates
Components: main non-free-firmware contrib
Signed-By: $KEYRING
Types: deb
URIs: https://security.debian.org/debian-security
Suites: trixie-security
Components: main non-free-firmware contrib
Signed-By: $KEYRING
EOM
[[ -f /etc/apt/sources.list ]] && rm -f /etc/apt/sources.list && echo "Old /etc/apt/sources.list removed."
if [[ ! -f "$KEYRING" ]]; then
if ! add_apt_key_from_url "$KEY_URL" "$KEYRING"; then
echo "Warning: failed to add key from $KEY_URL" >&2
fi
fi
if [[ ! -f "$SOURCES" ]] || ! printf '%s\n' "$CONTENT" | cmp -s - "$SOURCES"; then
add_apt_sources_file "$CONTENT" "$SOURCES" || {
echo "Failed to write $SOURCES" >&2
exit 1
}
apt-get update
echo "File $SOURCES written"
else
echo "File $SOURCES unchanged"
fi