#!/bin/bash
set -euo pipefail

# Core + official-repo plugins
sudo pacman -S --noconfirm --needed \
    cockpit \
    cockpit-pcp \
    pcp

# AUR plugins: machines (VMs), podman containers, file navigator
yay -S --answerdiff None --answerclean All --noconfirm \
    cockpit-machines \
    cockpit-podman \
    cockpit-navigator

sudo systemctl enable cockpit.socket
echo "Cockpit enabled. Web UI available at https://localhost:9090"
