commit acfe399c86e1b46919222d9d4aaf2ee0353da1cb Author: Josevi Canet Date: Tue Jun 23 07:55:28 2026 +0200 first commit diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..8ccc4ad --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,80 @@ +# Procedimiento de instalación + +Pasos para instalar Arch en las dos máquinas (NVMe 250G + SSD SATA 1TB) desde el +USB live, en un comando. Variantes: GNOME o KDE. + +## 0. Una vez (preparación de repos) + +Sube los repos a Gitea si no lo has hecho: + +- `arch-setup` → `gitea.josevi.ovh/josevi/arch-setup` +- contenido de `configs/` → `gitea.josevi.ovh/josevi/configs` (dotfiles, chezmoi) + +Ten a mano un **token de aplicación** de Gitea (Settings → Applications) para +clonar `configs` si es privado. + +## 1. Arrancar el USB live de Arch + +Boot desde el USB. Entras como `root` automáticamente. + +## 2. Conexión a internet + +- **Cable:** ya funciona. +- **WiFi:** `iwctl` → `station wlan0 connect ` → `exit`. +- Comprueba: `ping -c1 archlinux.org` + +## 3. Verificar discos (importante) + +```bash +lsblk +``` + +Confirma que el NVMe es `nvme0n1` y el SSD SATA de 1TB es `sda`. Si no, edita los +JSON antes de seguir. + +## 4. Clonar y lanzar + +```bash +pacman -Sy --noconfirm git +git clone https://gitea.josevi.ovh/josevi/arch-setup +cd arch-setup +./gnome/setup.sh # o ./kde/setup.sh +``` + +## 5. Responder los prompts + +Pide: **usuario**, **token de Gitea** (Enter si `configs` es público), **nombre** +y **email** de git, y la **contraseña** del usuario. A partir de ahí va solo: + +> archinstall (borra discos, particiona, instala base+escritorio) → chroot → +> instala todo (pacman + AUR/paru) → escribe el tema → `chezmoi init --apply`. + +⚠️ **Borra los DOS discos**, incluido el SSD de 1TB (`/home`). + +## 6. Reiniciar + +```bash +reboot +``` + +Quita el USB. En el **primer login gráfico** se aplica el tema Catppuccin, +iconos, fuentes, dock (GNOME) y el teclado `us-intl`. Ese oneshot se +autodestruye; el segundo login arranca limpio. + +## 7. Segunda máquina + +Repite los pasos 1–6. Mismo comando, misma config. + +--- + +**Si archinstall falla en el particionado** (lo más probable por versión): lanza +`archinstall` a secas, define los discos replicando el esquema, *Save +configuration*, y pega ese bloque `disk_config` en el JSON. El resto no cambia. + +Esquema de discos: + +| Disco | Rol | Particiones | +|-------|-----|-------------| +| `nvme0n1` (250G) | sistema | ESP `/boot/efi` 512M + `/boot` ext4 1G + `/` btrfs · GRUB | +| `sda` (1TB SATA) | datos | ext4 todo el disco → `/home` | +| — | swap | zram | diff --git a/README.md b/README.md new file mode 100644 index 0000000..9ce4099 --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# arch-setup + +Instalación automatizada de Arch Linux para mis dos máquinas (hardware idéntico), +en **un único comando** desde el USB live, sin reiniciar entre la base y la config. +Dos variantes de escritorio: **GNOME** y **KDE Plasma**. + +``` +arch-setup/ +├── gnome/ archinstall-config.json + setup.sh (GNOME, gdm) +├── kde/ archinstall-config.json + setup.sh (KDE Plasma, sddm) +├── shared/ packages-common.sh (paquetes comunes a ambos) +└── README.md +``` + +> Procedimiento paso a paso completo en [INSTALL.md](INSTALL.md). + +## Uso (desde el USB live de Arch, como root) + +```bash +pacman -Sy --noconfirm git +git clone https://gitea.josevi.ovh/josevi/arch-setup +cd arch-setup +./gnome/setup.sh # o ./kde/setup.sh +``` + +El script te pide: usuario a crear, token de Gitea (para el repo `configs` +privado), nombre y email de git. Después, sin más intervención: + +1. `archinstall --silent` con el JSON de la variante → instala base + escritorio + en `/mnt`. +2. Se copia a sí mismo a `/mnt` y entra en `arch-chroot`. +3. Dentro del chroot: crea el usuario, instala paquetes (pacman + AUR vía + `paru`), aplica el aspecto y ejecuta `chezmoi init --apply` apuntando a + `gitea.josevi.ovh/josevi/configs`. +4. Quitas el USB y `reboot`. El tema se aplica en el primer login gráfico. + +## Decisiones + +- **AUR-first**: lo que está en repos oficiales va por `pacman`; el resto por + `paru` (se bootstrapea solo). Sin Flatpak salvo que lo añadas. +- **Contenedores**: Podman + `podman-docker` (capa de compat), no Docker. +- **Navegador**: Zen Browser. También ungoogled-chromium. +- **Aspecto**: Catppuccin Mocha + iconos Papirus-Dark + JetBrains Mono Nerd en + ambos escritorios (coherencia GNOME/KDE). GNOME añade Dash-to-Dock y + extensiones (AppIndicator, Blur my Shell, Caffeine, Clipboard Indicator, Vitals). +- **Dotfiles**: `chezmoi` apuntando a un repo separado (`configs`). + +## ⚠️ Antes de lanzar + +- **Se borran DOS discos** (`"wipe": true` en ambos). Recrea el esquema actual: + - `/dev/nvme0n1` → ESP 512M (`/boot/efi`) + `/boot` ext4 1G + `/` btrfs (resto) + - `/dev/sda` → ext4 todo el disco en `/home` (**ojo: esto destruye el HDD de datos**) + - swap = zram (`"swap": true`), sin partición de swap + - bootloader **GRUB** (coherente con ESP en `/boot/efi` + `/boot` separado) + + Verifica los nombres con `lsblk`; si tus discos no son `nvme0n1`/`sda`, edítalos. +- **Esquema de particiones de archinstall** cambia entre versiones, y el + particionado manual multi-disco es lo más sensible. Si archinstall se queja del + `disk_config`, abre `archinstall` interactivo, define los discos a mano, usa + **Save configuration** y pega ese bloque `disk_config` en el JSON. +- Zona horaria/teclado fijados a `Europe/Madrid` / `us-acentos`. Ajusta si hace falta. + +## Apps que se instalan + +Comunes (`shared/packages-common.sh`): zsh+starship+CLI moderno, git+base-devel, +Podman, nodejs/python/rustup, Bitwarden, DBeaver, Obsidian, GIMP, Syncthing, +Remmina+FreeRDP, Apostrophe, Zen Browser, VSCode, DavMail, Betterbird, OnlyOffice, +Spotify, ungoogled-chromium, Input Remapper, HelpWire (vía `.deb`→`debtap`). +GNOME añade gnome-calculator/tweaks; KDE añade kcalc/ark/spectacle. diff --git a/gnome/archinstall-config.json b/gnome/archinstall-config.json new file mode 100644 index 0000000..db10205 --- /dev/null +++ b/gnome/archinstall-config.json @@ -0,0 +1,79 @@ +{ + "config_version": "3.0.0", + "archinstall-language": "Spanish", + "bootloader": "Grub", + "hostname": "arch-gnome", + "kernels": ["linux"], + "ntp": true, + "swap": true, + "timezone": "Europe/Madrid", + "locale_config": { + "kb_layout": "us-acentos", + "sys_enc": "UTF-8", + "sys_lang": "es_ES.UTF-8" + }, + "mirror_config": { + "mirror_regions": { "Spain": [] } + }, + "network_config": { "type": "nm" }, + "audio_config": { "audio": "pipewire" }, + "profile_config": { + "gfx_driver": "All open-source", + "greeter": "gdm", + "profile": { "main": "Desktop", "details": ["GNOME"] } + }, + "packages": ["networkmanager", "git", "sudo", "vim", "curl"], + "disk_config": { + "config_type": "manual_partitioning", + "device_modifications": [ + { + "device": "/dev/nvme0n1", + "wipe": true, + "partitions": [ + { + "type": "primary", + "status": "create", + "fs_type": "fat32", + "mountpoint": "/boot/efi", + "start": { "unit": "MiB", "value": 1 }, + "size": { "unit": "MiB", "value": 512 }, + "flags": ["boot", "esp"] + }, + { + "type": "primary", + "status": "create", + "fs_type": "ext4", + "mountpoint": "/boot", + "start": { "unit": "MiB", "value": 513 }, + "size": { "unit": "GiB", "value": 1 }, + "flags": [] + }, + { + "type": "primary", + "status": "create", + "fs_type": "btrfs", + "mountpoint": "/", + "start": { "unit": "GiB", "value": 2 }, + "size": { "unit": "Percent", "value": 100 }, + "flags": [] + } + ] + }, + { + "device": "/dev/sda", + "wipe": true, + "partitions": [ + { + "type": "primary", + "status": "create", + "fs_type": "ext4", + "mountpoint": "/home", + "start": { "unit": "MiB", "value": 1 }, + "size": { "unit": "Percent", "value": 100 }, + "flags": [] + } + ] + } + ] + } +} diff --git a/gnome/setup.sh b/gnome/setup.sh new file mode 100755 index 0000000..bcba17c --- /dev/null +++ b/gnome/setup.sh @@ -0,0 +1,129 @@ +#!/usr/bin/env bash +# Instalación + configuración de Arch con GNOME en UN comando desde el USB live. +# +# ./gnome/setup.sh +# +# Dos fases en el mismo fichero (ponytail: una sola fuente de verdad por DE, +# en vez de duplicar la lógica en un bootstrap + un post-install): +# - SETUP_PHASE=host -> corre archinstall y se re-lanza dentro del chroot +# - SETUP_PHASE=chroot -> instala paquetes/tema/chezmoi en el sistema nuevo +set -euo pipefail + +REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +DE="gnome" +SETUP_PHASE="${SETUP_PHASE:-host}" +GITEA="https://gitea.josevi.ovh/josevi" + +# --------------------------------------------------------------------------- +# FASE 1 (USB live): archinstall + chroot +# --------------------------------------------------------------------------- +if [[ "$SETUP_PHASE" == "host" ]]; then + [[ $EUID -eq 0 ]] || { echo "Ejecuta como root desde el live ISO."; exit 1; } + + read -rp "Usuario a crear: " INSTALL_USER + read -rsp "Token de Gitea (repo configs privado, Enter si es público): " GITEA_TOKEN; echo + read -rp "Nombre para git [$INSTALL_USER]: " GIT_NAME; GIT_NAME="${GIT_NAME:-$INSTALL_USER}" + read -rp "Email para git [josevisw@gmail.com]: " GIT_EMAIL; GIT_EMAIL="${GIT_EMAIL:-josevisw@gmail.com}" + + echo ">> Lanzando archinstall (instala base + GNOME en /mnt)..." + archinstall --config "$REPO_DIR/$DE/archinstall-config.json" --silent + + echo ">> Copiando arch-setup al sistema nuevo y entrando en chroot..." + cp -r "$REPO_DIR" /mnt/root/arch-setup + arch-chroot /mnt env \ + SETUP_PHASE=chroot INSTALL_USER="$INSTALL_USER" GITEA_TOKEN="$GITEA_TOKEN" \ + GIT_NAME="$GIT_NAME" GIT_EMAIL="$GIT_EMAIL" \ + bash "/root/arch-setup/$DE/setup.sh" + + echo ">> Listo. Quita el USB y reinicia: reboot" + exit 0 +fi + +# --------------------------------------------------------------------------- +# FASE 2 (dentro del chroot) +# --------------------------------------------------------------------------- +: "${INSTALL_USER:?falta INSTALL_USER}" +source "$(dirname "${BASH_SOURCE[0]}")/../shared/packages-common.sh" + +echo ">> Creando usuario $INSTALL_USER..." +id "$INSTALL_USER" &>/dev/null || useradd -m -G wheel -s /bin/zsh "$INSTALL_USER" +echo "Contraseña para $INSTALL_USER:"; passwd "$INSTALL_USER" +# wheel con sudo; NOPASSWD temporal para que paru/makepkg no se cuelguen +echo '%wheel ALL=(ALL:ALL) ALL' >/etc/sudoers.d/10-wheel +echo "$INSTALL_USER ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/99-setup-nopasswd + +echo ">> Paquetes oficiales (pacman)..." +install_pacman "${PACMAN_COMMON[@]}" \ + gnome-calculator gnome-tweaks gnome-themes-extra \ + gnome-shell-extension-appindicator + +echo ">> Bootstrapeando paru y paquetes AUR..." +bootstrap_paru +install_aur "${AUR_COMMON[@]}" \ + catppuccin-gtk-theme-mocha \ + gnome-shell-extension-dash-to-dock \ + gnome-shell-extension-caffeine \ + gnome-shell-extension-blur-my-shell \ + gnome-shell-extension-clipboard-indicator \ + gnome-shell-extension-vitals +install_helpwire + +echo ">> Servicios..." +systemctl enable NetworkManager +systemctl enable --global syncthing.service 2>/dev/null || true + +# --- Aspecto: se aplica en el PRIMER login gráfico ------------------------ +# ponytail: dconf/gsettings necesitan sesión D-Bus, que no existe en chroot. +# Un oneshot de autostart lo aplica al primer login y se autodesactiva. +USER_HOME="/home/$INSTALL_USER" +install -d -o "$INSTALL_USER" -g "$INSTALL_USER" "$USER_HOME/.local/bin" "$USER_HOME/.config/autostart" + +cat >"$USER_HOME/.local/bin/firstboot-theme.sh" <<'EOS' +#!/usr/bin/env bash +set -e +# Teclado: US internacional con teclas muertas +gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us+intl')]" +gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' +gsettings set org.gnome.desktop.interface gtk-theme 'catppuccin-mocha-blue-standard+default' +gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark' +gsettings set org.gnome.desktop.interface font-name 'JetBrainsMono Nerd Font 11' +gsettings set org.gnome.desktop.interface monospace-font-name 'JetBrainsMono Nerd Font Mono 12' +for e in \ + dash-to-dock@micxgx.gmail.com \ + appindicatorsupport@rgcjonas.gmail.com \ + blur-my-shell@aunetx \ + caffeine@patapon.info \ + clipboard-indicator@tudmotu.com \ + Vitals@CoreCoding.com ; do + gnome-extensions enable "$e" 2>/dev/null || true +done +# Dock estilo macOS abajo +D=org.gnome.shell.extensions.dash-to-dock +gsettings set $D dock-position 'BOTTOM' 2>/dev/null || true +gsettings set $D extend-height false 2>/dev/null || true +gsettings set $D dock-fixed false 2>/dev/null || true +# autodesactivarse +rm -f "$HOME/.config/autostart/firstboot-theme.desktop" +EOS +chmod +x "$USER_HOME/.local/bin/firstboot-theme.sh" + +cat >"$USER_HOME/.config/autostart/firstboot-theme.desktop" <> chezmoi init --apply (repo configs)..." +install_aur chezmoi +REMOTE="$GITEA/configs.git" +[[ -n "${GITEA_TOKEN:-}" ]] && REMOTE="https://$INSTALL_USER:$GITEA_TOKEN@gitea.josevi.ovh/josevi/configs.git" +as_user "export GIT_NAME='$GIT_NAME' GIT_EMAIL='$GIT_EMAIL'; \ + chezmoi init --apply '$REMOTE'" + +# quitar el NOPASSWD temporal +rm -f /etc/sudoers.d/99-setup-nopasswd +echo ">> Configuración de GNOME completada." diff --git a/kde/archinstall-config.json b/kde/archinstall-config.json new file mode 100644 index 0000000..884b0e0 --- /dev/null +++ b/kde/archinstall-config.json @@ -0,0 +1,79 @@ +{ + "config_version": "3.0.0", + "archinstall-language": "Spanish", + "bootloader": "Grub", + "hostname": "arch-kde", + "kernels": ["linux"], + "ntp": true, + "swap": true, + "timezone": "Europe/Madrid", + "locale_config": { + "kb_layout": "us-acentos", + "sys_enc": "UTF-8", + "sys_lang": "es_ES.UTF-8" + }, + "mirror_config": { + "mirror_regions": { "Spain": [] } + }, + "network_config": { "type": "nm" }, + "audio_config": { "audio": "pipewire" }, + "profile_config": { + "gfx_driver": "All open-source", + "greeter": "sddm", + "profile": { "main": "Desktop", "details": ["KDE Plasma"] } + }, + "packages": ["networkmanager", "git", "sudo", "vim", "curl"], + "disk_config": { + "config_type": "manual_partitioning", + "device_modifications": [ + { + "device": "/dev/nvme0n1", + "wipe": true, + "partitions": [ + { + "type": "primary", + "status": "create", + "fs_type": "fat32", + "mountpoint": "/boot/efi", + "start": { "unit": "MiB", "value": 1 }, + "size": { "unit": "MiB", "value": 512 }, + "flags": ["boot", "esp"] + }, + { + "type": "primary", + "status": "create", + "fs_type": "ext4", + "mountpoint": "/boot", + "start": { "unit": "MiB", "value": 513 }, + "size": { "unit": "GiB", "value": 1 }, + "flags": [] + }, + { + "type": "primary", + "status": "create", + "fs_type": "btrfs", + "mountpoint": "/", + "start": { "unit": "GiB", "value": 2 }, + "size": { "unit": "Percent", "value": 100 }, + "flags": [] + } + ] + }, + { + "device": "/dev/sda", + "wipe": true, + "partitions": [ + { + "type": "primary", + "status": "create", + "fs_type": "ext4", + "mountpoint": "/home", + "start": { "unit": "MiB", "value": 1 }, + "size": { "unit": "Percent", "value": 100 }, + "flags": [] + } + ] + } + ] + } +} diff --git a/kde/setup.sh b/kde/setup.sh new file mode 100755 index 0000000..6a537a4 --- /dev/null +++ b/kde/setup.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash +# Instalación + configuración de Arch con KDE Plasma en UN comando desde el live. +# +# ./kde/setup.sh +# +# Misma estructura de 2 fases que gnome/setup.sh (ver ese fichero para detalle). +set -euo pipefail + +REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +DE="kde" +SETUP_PHASE="${SETUP_PHASE:-host}" +GITEA="https://gitea.josevi.ovh/josevi" + +# --------------------------------------------------------------------------- +# FASE 1 (USB live): archinstall + chroot +# --------------------------------------------------------------------------- +if [[ "$SETUP_PHASE" == "host" ]]; then + [[ $EUID -eq 0 ]] || { echo "Ejecuta como root desde el live ISO."; exit 1; } + + read -rp "Usuario a crear: " INSTALL_USER + read -rsp "Token de Gitea (repo configs privado, Enter si es público): " GITEA_TOKEN; echo + read -rp "Nombre para git [$INSTALL_USER]: " GIT_NAME; GIT_NAME="${GIT_NAME:-$INSTALL_USER}" + read -rp "Email para git [josevisw@gmail.com]: " GIT_EMAIL; GIT_EMAIL="${GIT_EMAIL:-josevisw@gmail.com}" + + echo ">> Lanzando archinstall (instala base + KDE en /mnt)..." + archinstall --config "$REPO_DIR/$DE/archinstall-config.json" --silent + + echo ">> Copiando arch-setup al sistema nuevo y entrando en chroot..." + cp -r "$REPO_DIR" /mnt/root/arch-setup + arch-chroot /mnt env \ + SETUP_PHASE=chroot INSTALL_USER="$INSTALL_USER" GITEA_TOKEN="$GITEA_TOKEN" \ + GIT_NAME="$GIT_NAME" GIT_EMAIL="$GIT_EMAIL" \ + bash "/root/arch-setup/$DE/setup.sh" + + echo ">> Listo. Quita el USB y reinicia: reboot" + exit 0 +fi + +# --------------------------------------------------------------------------- +# FASE 2 (dentro del chroot) +# --------------------------------------------------------------------------- +: "${INSTALL_USER:?falta INSTALL_USER}" +source "$(dirname "${BASH_SOURCE[0]}")/../shared/packages-common.sh" + +echo ">> Creando usuario $INSTALL_USER..." +id "$INSTALL_USER" &>/dev/null || useradd -m -G wheel -s /bin/zsh "$INSTALL_USER" +echo "Contraseña para $INSTALL_USER:"; passwd "$INSTALL_USER" +echo '%wheel ALL=(ALL:ALL) ALL' >/etc/sudoers.d/10-wheel +echo "$INSTALL_USER ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/99-setup-nopasswd + +echo ">> Paquetes oficiales (pacman)..." +install_pacman "${PACMAN_COMMON[@]}" \ + kcalc ark spectacle + +echo ">> Bootstrapeando paru y paquetes AUR..." +bootstrap_paru +install_aur "${AUR_COMMON[@]}" +install_helpwire + +echo ">> Servicios..." +systemctl enable NetworkManager +systemctl enable --global syncthing.service 2>/dev/null || true + +# --- Aspecto: se aplica en el PRIMER login gráfico ------------------------ +# ponytail: el global theme de Plasma necesita sesión; lo aplica un oneshot +# de autostart. Base Breeze Dark + esquema de color Catppuccin Mocha + Papirus. +# upgrade path: layer del look-and-feel completo de catppuccin/kde si lo quieres. +USER_HOME="/home/$INSTALL_USER" +install -d -o "$INSTALL_USER" -g "$INSTALL_USER" \ + "$USER_HOME/.local/bin" "$USER_HOME/.config/autostart" \ + "$USER_HOME/.local/share/color-schemes" + +cat >"$USER_HOME/.local/bin/firstboot-theme.sh" <<'EOS' +#!/usr/bin/env bash +set -e +CS="$HOME/.local/share/color-schemes/CatppuccinMochaBlue.colors" +if [[ ! -f "$CS" ]]; then + curl -fsSL -o "$CS" \ + "https://raw.githubusercontent.com/catppuccin/kde/main/Mocha/color-schemes/CatppuccinMochaBlue.colors" || true +fi +# Teclado: US internacional con teclas muertas +kwriteconfig6 --file kxkbrc --group Layout --key LayoutList "us" +kwriteconfig6 --file kxkbrc --group Layout --key VariantList "intl" +kwriteconfig6 --file kxkbrc --group Layout --key Use "true" +plasma-apply-colorscheme CatppuccinMochaBlue 2>/dev/null || true +plasma-apply-desktoptheme breeze-dark 2>/dev/null || true +plasma-changeicons Papirus-Dark 2>/dev/null || true +# Fuentes +kwriteconfig6 --file kdeglobals --group General --key font "JetBrains Mono Nerd Font,11,-1,5,50,0,0,0,0,0" +kwriteconfig6 --file kdeglobals --group General --key fixed "JetBrains Mono Nerd Font Mono,12,-1,5,50,0,0,0,0,0" +rm -f "$HOME/.config/autostart/firstboot-theme.desktop" +EOS +chmod +x "$USER_HOME/.local/bin/firstboot-theme.sh" + +cat >"$USER_HOME/.config/autostart/firstboot-theme.desktop" <> chezmoi init --apply (repo configs)..." +install_aur chezmoi +REMOTE="$GITEA/configs.git" +[[ -n "${GITEA_TOKEN:-}" ]] && REMOTE="https://$INSTALL_USER:$GITEA_TOKEN@gitea.josevi.ovh/josevi/configs.git" +as_user "export GIT_NAME='$GIT_NAME' GIT_EMAIL='$GIT_EMAIL'; \ + chezmoi init --apply '$REMOTE'" + +rm -f /etc/sudoers.d/99-setup-nopasswd +echo ">> Configuración de KDE completada." diff --git a/shared/packages-common.sh b/shared/packages-common.sh new file mode 100755 index 0000000..ee249cc --- /dev/null +++ b/shared/packages-common.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# Paquetes comunes a GNOME y KDE. Lo sourcea cada /setup.sh. +# AUR-first: lo que está en repos oficiales va por pacman, el resto por paru. + +# --- Repos oficiales (pacman) --------------------------------------------- +PACMAN_COMMON=( + # base / shell / CLI moderno + zsh starship fzf ripgrep bat eza btop zoxide fd tldr + # dev toolchain (Podman en vez de Docker + capa de compat) + git base-devel podman podman-docker buildah + nodejs npm python python-pip rustup + # apps de escritorio que SÍ están en extra + bitwarden dbeaver obsidian gimp syncthing remmina freerdp apostrophe + # fuentes / iconos compartidos + ttf-jetbrains-mono-nerd ttf-firacode-nerd noto-fonts noto-fonts-emoji + papirus-icon-theme + # red / utilidades base + networkmanager flatpak openssh +) + +# --- AUR (paru) ------------------------------------------------------------ +# helpwire: es un .deb; no hay paquete AUR estable -> se convierte con debtap +# (lo gestiona aparte la función install_helpwire de setup.sh). +AUR_COMMON=( + zen-browser-bin + visual-studio-code-bin + davmail + betterbird-bin + onlyoffice-bin + spotify + ungoogled-chromium-bin + input-remapper-git +) + +# --- helpers usados por los setup.sh -------------------------------------- +install_pacman() { pacman -S --needed --noconfirm "$@"; } + +# paru se construye como usuario normal (makepkg no corre como root) +as_user() { sudo -u "$INSTALL_USER" bash -lc "$*"; } + +bootstrap_paru() { + command -v paru &>/dev/null && return 0 + install_pacman git base-devel + as_user 'cd /tmp && rm -rf paru-bin && \ + git clone https://aur.archlinux.org/paru-bin.git && \ + cd paru-bin && makepkg -si --noconfirm' +} + +install_aur() { + # ponytail: paru en una sola llamada; si un PKGBUILD falla, falla el lote. + # upgrade path: instalar uno a uno con un bucle si necesitas tolerancia a fallos. + as_user "paru -S --needed --noconfirm $*" +} + +# HelpWire no tiene AUR: descargar .deb, convertir con debtap, instalar. +install_helpwire() { + local url="https://www.helpwire.app/downloads/operator/linux/helpwire-operator.deb" + install_aur debtap + as_user "sudo debtap -u || true" + as_user "cd /tmp && curl -fsSL -o helpwire.deb '$url' && \ + yes '' | sudo debtap -Q helpwire.deb && \ + sudo pacman -U --noconfirm helpwire-operator*.pkg.tar.zst" +}