mirror of
https://github.com/marcogll/omarchy_setup.git
synced 2026-01-13 21:35:16 +00:00
* feat: add dev tools, AI aliases, and improve zshrc documentation
This commit introduces several new features and improvements:
- **Adds Development Tools to `apps.sh`:** The `apps.sh` module now installs essential development tools, including `python`, `pip`, `nodejs`, `npm`, `uv`, and `nvm`.
- **Implements `.zshrc.local` for Private Variables:**
- A `.zshrc.local.example` file has been added to serve as a template for users to securely store their private environment variables, such as API keys.
- The main `.zshrc` file now sources `.zshrc.local` if it exists.
- **Adds AI Aliases to `.zshrc`:** A new section has been added to `.zshrc` with example aliases for interacting with command-line AI tools.
- **Improves `.zshrc` Documentation:** The `.zshrc` file has been thoroughly documented with comments in Spanish, explaining the purpose of each section. The title has also been updated and professionalized.
- **Fixes a Regression:** This commit restores the `ytm`, `ytv`, `ytls`, and SSH agent functions in `.zshrc` that were accidentally removed in a previous step.
* feat: improve keyring UX and icon manager flow
This commit introduces two main improvements to the user experience:
1. **Refactors the Icon Manager for Non-Interactive Installation:**
- The `icon_manager.sh` module can now be run in a non-interactive mode.
- The "Install All" process has been updated to use this non-interactive mode, which installs the default icon theme without pausing the script or requiring user input.
2. **Improves the GNOME Keyring Workflow:**
- The script no longer errors out if the GNOME Keyring agent is not immediately available after installation.
- Instead, a clear summary message is now displayed at the end of the "Install All" process, instructing the user to log out and back in, and then run the SSH key synchronization module separately. This provides a much smoother and more intuitive user experience.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Marco Gallegos <marco.gallegos@outlook.com>
72 lines
2.5 KiB
Bash
Executable File
72 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ===============================================================
|
|
# docker.sh - Configuración de Docker y Portainer
|
|
# ===============================================================
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
source "${SCRIPT_DIR}/common.sh"
|
|
|
|
install_docker() {
|
|
log_step "Configuración de Docker y Portainer"
|
|
|
|
# Instalar Docker
|
|
log_info "Instalando Docker y Docker Compose..."
|
|
sudo pacman -S --noconfirm --needed \
|
|
docker docker-compose || {
|
|
log_error "Error al instalar Docker"
|
|
return 1
|
|
}
|
|
|
|
# Habilitar y iniciar Docker
|
|
log_info "Habilitando servicio de Docker..."
|
|
sudo systemctl enable docker.service
|
|
sudo systemctl enable containerd.service
|
|
sudo systemctl start docker.service
|
|
|
|
# Agregar usuario al grupo docker (si no está ya)
|
|
if ! groups "$USER" | grep -q docker; then
|
|
log_info "Agregando usuario al grupo docker..."
|
|
sudo usermod -aG docker "$USER"
|
|
log_warning "Necesitarás cerrar sesión y volver a iniciar para usar Docker sin sudo"
|
|
fi
|
|
|
|
echo ""
|
|
read -p "¿Deseas instalar Portainer (interfaz web para Docker)? [S/n]: " confirm_portainer
|
|
if [[ ! "${confirm_portainer}" =~ ^[Nn]$ ]]; then
|
|
log_info "Configurando Portainer..."
|
|
|
|
# Verificar si Portainer ya está corriendo
|
|
if sudo docker ps -a --format '{{.Names}}' | grep -q "^portainer$"; then
|
|
log_info "Portainer ya existe. Reiniciando contenedor..."
|
|
sudo docker stop portainer 2>/dev/null || true
|
|
sudo docker rm portainer 2>/dev/null || true
|
|
fi
|
|
|
|
# Crear volumen y contenedor de Portainer
|
|
sudo docker volume create portainer_data 2>/dev/null || true
|
|
|
|
if sudo docker run -d -p 8000:8000 -p 9443:9443 \
|
|
--name portainer \
|
|
--restart=always \
|
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
-v portainer_data:/data \
|
|
portainer/portainer-ce:latest; then
|
|
log_success "Portainer instalado y ejecutándose"
|
|
log_info "Accede a Portainer en: https://localhost:9443"
|
|
else
|
|
log_error "Error al instalar Portainer"
|
|
# No retornamos error, Docker ya está instalado.
|
|
fi
|
|
else
|
|
log_info "Se omitió la instalación de Portainer."
|
|
fi
|
|
|
|
log_success "Configuración de Docker completada."
|
|
return 0
|
|
}
|
|
|
|
# Ejecutar si se llama directamente
|
|
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|
install_docker "$@"
|
|
fi
|