diff --git a/gnome/archinstall-config.json b/gnome/archinstall-config.json index 510a144..b2ae425 100644 --- a/gnome/archinstall-config.json +++ b/gnome/archinstall-config.json @@ -4,7 +4,8 @@ "bootloader": "Grub", "hostname": "arch-gnome", "kernels": [ - "linux" + "linux", + "linux-lts" ], "ntp": true, "swap": true, diff --git a/gnome/setup.sh b/gnome/setup.sh index 7c52d70..06568f6 100644 --- a/gnome/setup.sh +++ b/gnome/setup.sh @@ -71,6 +71,9 @@ install_pacman "${PACMAN_COMMON[@]}" \ echo ">> Bootloader (GRUB)..." install_bootloader +echo ">> Configurando rollback de actualizaciones (snapper)..." +configure_btrfs_rollback + echo ">> Bootstrapeando paru y paquetes AUR..." bootstrap_paru install_aur "${AUR_COMMON[@]}" \ @@ -83,6 +86,9 @@ install_aur "${AUR_COMMON[@]}" \ install_helpwire install_claude_code +echo ">> Instalando Flatpaks comunes..." +install_flatpaks "${FLATPAK_COMMON[@]}" + echo ">> Servicios..." systemctl enable gdm systemctl enable NetworkManager diff --git a/kde/archinstall-config.json b/kde/archinstall-config.json index 6e9587e..b89e479 100644 --- a/kde/archinstall-config.json +++ b/kde/archinstall-config.json @@ -4,7 +4,8 @@ "bootloader": "Grub", "hostname": "arch-kde", "kernels": [ - "linux" + "linux", + "linux-lts" ], "ntp": true, "swap": true, diff --git a/kde/setup.sh b/kde/setup.sh index 82b21c4..0ef05f8 100644 --- a/kde/setup.sh +++ b/kde/setup.sh @@ -67,12 +67,17 @@ install_pacman "${PACMAN_COMMON[@]}" \ konsole dolphin kate ark spectacle kcalc gwenview okular kdeconnect kdegraphics-thumbnailers \ plasma-systemmonitor \ adwaita-fonts \ - mesa vulkan-icd-loader vulkan-radeon vulkan-intel intel-media-driver -# Sin discover/packagekit-qt6: se usa pamac-all (AUR_COMMON) como gestor gráfico. + mesa vulkan-icd-loader vulkan-radeon vulkan-intel intel-media-driver \ + packagekit-qt6 +# Sin discover: se usa pamac-all + pamac-tray-plasma-git como gestor gráfico. +# packagekit-qt6 lo requiere pamac-tray-plasma-git. echo ">> Bootloader (GRUB)..." install_bootloader +echo ">> Configurando rollback de actualizaciones (snapper)..." +configure_btrfs_rollback + echo ">> Bootstrapeando paru y paquetes AUR..." bootstrap_paru # Solo plasmoides que EXISTEN en AUR. Los de KDE Store/GitHub (gnome-pager, kMenu, @@ -83,10 +88,13 @@ install_aur "${AUR_COMMON[@]}" \ plasma6-applets-panel-colorizer kwin-effects-better-blur-dx kwin-effects-glass-git breeze-enhanced \ plasma6-themes-layan-git tela-icon-theme layan-cursor-theme-git \ plasma6-applets-appgrid plasma6-wallpapers-smart-video-wallpaper-reborn pamac-tray-plasma-git \ - yin-yang + yin-yang kwin-decoration-sierra-breeze-enhanced-git install_helpwire install_claude_code +echo ">> Instalando Flatpaks comunes..." +install_flatpaks "${FLATPAK_COMMON[@]}" + echo ">> Servicios..." systemctl enable sddm systemctl enable NetworkManager diff --git a/shared/packages-common.sh b/shared/packages-common.sh index 72ede66..c28cac3 100644 --- a/shared/packages-common.sh +++ b/shared/packages-common.sh @@ -3,16 +3,18 @@ # AUR-first: lo que está en repos oficiales va por pacman, el resto por paru. # --- Repos oficiales (pacman) --------------------------------------------- +# Sincronizado con la instalación real de la máquina maestra. Si un paquete no +# está presente aquí, se elimina del instalador. PACMAN_COMMON=( # base / shell / CLI moderno zsh starship fzf ripgrep bat eza btop zoxide fd tldr fastfetch 7zip vim usbutils # dev toolchain (Podman en vez de Docker + capa de compat) git base-devel podman podman-docker buildah - nodejs npm python python-pip rustup - # sync de dotfiles (repo arch-configs) -- en repos oficiales desde 2.x, ya no hace falta AUR + nodejs npm python python-pip rustup github-cli + # sync de dotfiles (repo arch-configs) -- en repos oficiales desde 2.x chezmoi # apps de escritorio que SÍ están en extra - bitwarden dbeaver obsidian gimp syncthing remmina freerdp apostrophe guvcview kvirc vlc vlc-plugin-ffmpeg + bitwarden dbeaver gimp syncthing remmina freerdp apostrophe guvcview kvirc vlc vlc-plugin-ffmpeg # diccionarios (corrector ortográfico en apps GTK/Qt) hunspell-en_us hunspell-es_es # fuentes / iconos compartidos @@ -24,14 +26,27 @@ PACMAN_COMMON=( pipewire pipewire-alsa pipewire-jack pipewire-pulse wireplumber libpulse gst-plugin-pipewire gst-plugins-good gst-plugins-bad gst-libav # bluetooth: stack + daemon comunes. La UI va por DE: GNOME la trae vía - # gnome-control-center (depende de gnome-bluetooth); KDE NO, porque usamos un - # Plasma curado, así que bluedevil se instala explícito en kde/setup.sh. + # gnome-control-center; KDE la instala explícito en kde/setup.sh. bluez bluez-utils # hardware: mismo par de máquinas físicas (ver PROJECT_CONTEXT.md) amd-ucode sof-firmware btrfs-progs zram-generator cpupower power-profiles-daemon - ibus wl-clipboard wmctrl + ibus wl-clipboard wmctrl smartmontools # gvfs backend para montar móviles Android por MTP (Dolphin/Nautilus) gvfs-mtp + # kernels: último + LTS como fallback ante actualizaciones rotas + linux linux-lts linux-lts-headers linux-firmware + # rollback de actualizaciones atómicas sobre btrfs + snapper snap-pac grub-btrfs +) + +# --- Flatpak --------------------------------------------------------------- +# Aplicaciones que en la máquina maestra están instaladas como Flatpak. +# Antes algunas de estas vivían en AUR (p.ej. heroic-games-launcher-bin, +# karere); ahora se gestionan desde Flathub. +FLATPAK_COMMON=( + com.heroicgameslauncher.hgl + io.github.tobagin.karere + org.gnome.gitlab.cheywood.Buffer ) # --- AUR (paru) ------------------------------------------------------------ @@ -43,19 +58,18 @@ AUR_COMMON=( zen-browser-bin visual-studio-code-bin vscodium-bin - davmail betterbird-bin onlyoffice-bin spotify ungoogled-chromium-bin - karere ventoy-bin woeusb-ng bibata-cursor-theme-bin googledot-cursor-theme pamac-all yay - heroic-games-launcher-bin + # herramientas adicionales presentes en la máquina maestra + autofirma debtap gotify-desktop openlogi stably-orca-bin ) # --- helpers usados por los setup.sh -------------------------------------- @@ -128,3 +142,62 @@ install_helpwire() { install_claude_code() { as_user "curl -fsSL https://claude.ai/install.sh | bash" } + +# Instala aplicaciones desde Flathub. Se usa para apps que en la máquina +# maestra están como Flatpak, aunque antes estuvieran en AUR. +install_flatpaks() { + echo ">> Instalando Flatpaks comunes..." + if ! command -v flatpak &>/dev/null; then + echo "!! flatpak no está disponible; omitiendo Flatpaks." >&2 + return 0 + fi + + flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + + local app failed=() + for app in "$@"; do + flatpak install -y --noninteractive flathub "$app" || failed+=("$app") + done + ((${#failed[@]})) && echo "!! Flatpak falló (revisa a mano): ${failed[*]}" >&2 + return 0 +} + +# Configura snapper + snap-pac + grub-btrfs para rollback de actualizaciones. +# snap-pac crea snapshots automaticos antes/después de cada 'pacman -Syu'. +# grub-btrfs añade las entradas de snapshots al menú de GRUB. +configure_btrfs_rollback() { + echo ">> Configurando rollback btrfs (snapper + snap-pac + grub-btrfs)..." + + # Asegurar que / es btrfs; si no, no hacemos nada. + if ! findmnt -nro FSTYPE / | grep -q btrfs; then + echo "!! Advertencia: / no es btrfs; omitiendo configuración de snapper." >&2 + return 0 + fi + + # Crear configuración de snapper para / si no existe. + if [[ ! -f /etc/snapper/configs/root ]]; then + snapper -c root create-config / + fi + + # Solo queremos snapshots automáticos de pacman (snap-pac), no por tiempo. + # Esto evita que se acumulen snapshots innecesarios y se coma espacio. + snapper -c root set-config \ + TIMELINE_CREATE=no \ + TIMELINE_LIMIT_HOURLY=0 \ + TIMELINE_LIMIT_DAILY=0 \ + TIMELINE_LIMIT_WEEKLY=0 \ + TIMELINE_LIMIT_MONTHLY=0 \ + TIMELINE_LIMIT_YEARLY=0 \ + NUMBER_LIMIT=10 \ + NUMBER_LIMIT_IMPORTANT=10 + + # Ajustar permisos para que el usuario pueda listar snapshots. + chmod 750 /.snapshots + chown :wheel /.snapshots 2>/dev/null || true + + # Habilitar el daemon que regenera el menú de GRUB cuando cambian los snapshots. + systemctl enable grub-btrfsd + + # Regenerar menú de GRUB con las entradas de snapshots. + grub-mkconfig -o /boot/grub/grub.cfg +}