mirror of
https://github.com/arthur-pbty/arch-custom-iso.git
synced 2026-08-01 20:28:05 +02:00
Compare commits
5
Commits
293d7b0ee4
...
8a2fe1b8dd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a2fe1b8dd | ||
|
|
fb37dc8888 | ||
|
|
19fec9ca14 | ||
|
|
316328c1ef | ||
|
|
dd0a59f294 |
@@ -13,6 +13,7 @@ This project allows you to generate a fully customized Arch Linux installation I
|
||||
- Automated install scripts
|
||||
- Custom configs (dotfiles, system settings)
|
||||
- Reproducible builds
|
||||
- Support for your own packages built from source
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -276,9 +276,8 @@ for i = 1, 10 do
|
||||
local keycode = 9 + i -- 10=1, 11=2, 12=3 ... 18=9, 19=0
|
||||
local key_str = "code:" .. keycode
|
||||
|
||||
-- Utilisation de exec_cmd pour éviter les erreurs d'API (workspace est une table, pas une fonction)
|
||||
hl.bind(mainMod .. " + " .. key_str, hl.dsp.exec_cmd("workspace " .. i))
|
||||
hl.bind(mainMod .. " + SHIFT + " .. key_str, hl.dsp.exec_cmd("movetoworkspace " .. i))
|
||||
hl.bind(mainMod .. " + " .. key_str, hl.dsp.exec_cmd("hyprctl dispatch workspace " .. i))
|
||||
hl.bind(mainMod .. " + SHIFT + " .. key_str, hl.dsp.exec_cmd("hyprctl dispatch movetoworkspace " .. i))
|
||||
end
|
||||
|
||||
-- Example special workspace (scratchpad)
|
||||
|
||||
@@ -11,6 +11,7 @@ set -e
|
||||
ISO_NAME="arch-custom-iso"
|
||||
# On récupère le nom de l'utilisateur normal (pas root) pour makepkg
|
||||
BUILD_USER="${SUDO_USER:-root}"
|
||||
CUSTOM_PKGS_DIR="$PWD/custom-pkgs"
|
||||
|
||||
# ==============================================================================
|
||||
# LES LISTES DE PAQUETS
|
||||
@@ -51,7 +52,7 @@ echo "[1/5] Cleaning previous build..."
|
||||
rm -rf work out offline_cache
|
||||
|
||||
# --- TÉLÉCHARGEMENT DES PAQUETS OFFICIELS ---
|
||||
echo "[2/5] Downloading Official Packages for offline cache..."
|
||||
echo "[2/6] Downloading Official Packages for offline cache..."
|
||||
# On utilise /tmp pour éviter tout problème de permissions dans le Home
|
||||
TMP_CACHE="/tmp/archiso_cache_$$"
|
||||
mkdir -p "$TMP_CACHE"
|
||||
@@ -65,8 +66,25 @@ mkdir -p offline_cache
|
||||
cp "$TMP_CACHE"/*.pkg.tar.zst offline_cache/ 2>/dev/null || true
|
||||
rm -rf "$TMP_CACHE"
|
||||
|
||||
# --- COMPILATION DES PAQUETS PERSONNALISÉS ---
|
||||
echo "[3/6] Building custom packages from custom-pkgs/..."
|
||||
mkdir -p custom_pkg_build
|
||||
for pkg_dir in "$CUSTOM_PKGS_DIR"/*; do
|
||||
[ -d "$pkg_dir" ] || continue
|
||||
[ -f "$pkg_dir/PKGBUILD" ] || continue
|
||||
|
||||
pkg_name=$(basename "$pkg_dir")
|
||||
echo " -> Building custom package: $pkg_name"
|
||||
rm -rf "custom_pkg_build/$pkg_name"
|
||||
cp -a "$pkg_dir" "custom_pkg_build/$pkg_name"
|
||||
chown -R "$BUILD_USER":"$BUILD_USER" "custom_pkg_build/$pkg_name"
|
||||
sudo -u "$BUILD_USER" bash -lc "cd '$PWD/custom_pkg_build/$pkg_name' && makepkg -f --noconfirm --needed"
|
||||
mv "custom_pkg_build/$pkg_name"/*.pkg.tar.zst offline_cache/ 2>/dev/null || true
|
||||
done
|
||||
rm -rf custom_pkg_build
|
||||
|
||||
# --- COMPILATION DES PAQUETS AUR ---
|
||||
echo "[3/5] Building AUR Packages for offline cache..."
|
||||
echo "[4/6] Building AUR Packages for offline cache..."
|
||||
mkdir -p aur_build
|
||||
|
||||
for pkg in "${AUR_PACKAGES[@]}"; do
|
||||
@@ -89,13 +107,22 @@ done
|
||||
rm -rf aur_build
|
||||
|
||||
# --- INJECTION DANS L'ISO ---
|
||||
echo "[4/5] Injecting offline cache into ISO skeleton..."
|
||||
echo "[5/6] Injecting offline cache into ISO skeleton..."
|
||||
mkdir -p airootfs/root/offline_cache
|
||||
cp offline_cache/*.pkg.tar.zst airootfs/root/offline_cache/
|
||||
rm -rf offline_cache
|
||||
|
||||
# Copier les scripts personnalisés dans la racine du live system si nécessaire
|
||||
mkdir -p airootfs/usr/local/bin
|
||||
for script in custom-pkgs/*/*.sh; do
|
||||
[ -f "$script" ] || continue
|
||||
script_name="$(basename "$script")"
|
||||
target_name="${script_name%.sh}"
|
||||
install -Dm0755 "$script" "airootfs/usr/local/bin/$target_name"
|
||||
done
|
||||
|
||||
# --- CRÉATION DE L'ISO ---
|
||||
echo "[5/5] Building ISO (this will take a while)..."
|
||||
echo "[6/6] Building ISO (this will take a while)..."
|
||||
sudo mkarchiso -v .
|
||||
|
||||
if [ -f out/*.iso ]; then
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Paquets personnalisés
|
||||
|
||||
Place ici les sources de tes applications personnelles.
|
||||
|
||||
Structure recommandée :
|
||||
|
||||
- custom-pkgs/my-app/
|
||||
- PKGBUILD
|
||||
- .SRCINFO (généré automatiquement)
|
||||
- src/
|
||||
|
||||
Exemple rapide :
|
||||
|
||||
- une application en C/C++/Rust/Go/Python
|
||||
- un script shell autonome
|
||||
- un binaire déjà compilé
|
||||
|
||||
Pour une application non disponible sur pacman/AUR, la méthode la plus propre est de la packager avec un PKGBUILD puis de la construire dans le build ISO.
|
||||
@@ -0,0 +1,18 @@
|
||||
# Maintainer: Ton Nom <ton@email>
|
||||
|
||||
pkgname=optifetch
|
||||
pkgver=1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Version personnalisée de fastfetch intégrée dans l'ISO"
|
||||
arch=('x86_64')
|
||||
url='https://example.com/ton-projet'
|
||||
license=('MIT')
|
||||
depends=('gcc' 'make')
|
||||
source=("optifetch::git+https://github.com/arthur-pbty/optifetch.git")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
package() {
|
||||
cd "$srcdir/optifetch"
|
||||
make
|
||||
install -Dm0755 optifetch "$pkgdir/usr/bin/optifetch"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Ce script est exécuté dans l'environnement du live ISO
|
||||
# Il peut installer/mettre en place des éléments personnalisés.
|
||||
|
||||
echo "[custom] Configuration personnalisée de l'ISO"
|
||||
|
||||
# Exemple: créer un dossier pour tes applis perso
|
||||
mkdir -p /usr/local/bin /usr/local/share/my-apps
|
||||
|
||||
# Si tu as déjà un binaire compilé, tu peux l'ajouter ici.
|
||||
# Exemple:
|
||||
# install -Dm0755 /root/custom-app /usr/local/bin/custom-app
|
||||
|
||||
# Si tu veux rendre un script disponible globalement:
|
||||
# install -Dm0755 /root/custom-scripts/hello.sh /usr/local/bin/hello.sh
|
||||
Reference in New Issue
Block a user