feat: ignore idea folder

This commit is contained in:
2025-08-19 13:50:24 +02:00
parent 3761c28ed7
commit 017a8e9e74
2 changed files with 43 additions and 33 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
result* result*
.direnv/ .direnv/
*.qcow2 *.qcow2
.idea/

View File

@@ -284,9 +284,10 @@ isoConfig // {
nano nano
dnsutils dnsutils
dig dig
gnutar
]; ];
# REFACTORED: System Setup Service (Root Tasks) # System Setup Service (Root Tasks)
systemd.services.workshop-system-setup = { systemd.services.workshop-system-setup = {
description = "System-level checks for network, DNS, and Docker"; description = "System-level checks for network, DNS, and Docker";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@@ -355,39 +356,52 @@ isoConfig // {
}; };
}; };
# NEW: Abra Installation Service (Workshop User Task) # Abra Installation Service (System-wide)
systemd.services.workshop-abra-install = { systemd.services.workshop-abra-install = {
description = "Install abra CLI for the workshop user"; description = "Install abra CLI system-wide";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
# This service runs after the main system setup is complete
after = [ "workshop-system-setup.service" ]; after = [ "workshop-system-setup.service" ];
wants = [ "workshop-system-setup.service" ]; wants = [ "workshop-system-setup.service" ];
path = with pkgs; [ bash curl coreutils ]; # Reduced path for user-specific needs path = with pkgs; [ bash wget curl coreutils gnutar ];
# This script now runs as the 'workshop' user, no 'sudo' needed
script = '' script = ''
# Check if abra is already installed # Check if abra is already installed
if [ -f /home/workshop/.local/bin/abra ]; then if command -v abra >/dev/null 2>&1; then
echo " abra already installed." echo " abra already installed at $(which abra)"
abra --version
exit 0 exit 0
fi fi
echo "🚀 Installing abra for workshop user..."
# Create the target directory if it doesn't exist echo "🚀 Installing abra system-wide..."
mkdir -p /home/workshop/.local/bin
# Download and install abra directly into the user's local bin # Install to /usr/local/bin (default behavior)
curl -fsSL https://install.abra.coopcloud.tech | bash -s -- --install-dir /home/workshop/.local/bin curl -fsSL https://install.abra.coopcloud.tech | bash
# Add abra to $PATH
echo PATH=$PATH:/root/.local/bin >> /root/.profile
# Evaluate bashrc
source /root/.profile
# Set autocomplete properly
source <(abra autocomplete bash)
# Verify installation # Verify installation
if [ -f /home/workshop/.local/bin/abra ] && [ -x /home/workshop/.local/bin/abra ]; then if command -v abra >/dev/null 2>&1; then
echo " abra installed successfully to /home/workshop/.local/bin/abra" echo " abra installed successfully at $(which abra)"
abra --version
else else
echo " abra installation failed." echo " abra installation failed."
echo "Checking common locations..."
ls -la /root/.local/bin/abra 2>/dev/null || echo "Not in /root/.local/bin"
fi fi
''; '';
# CRITICAL CHANGE: This service runs as the workshop user
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;
User = "workshop"; User = "root";
Group = "users"; # Or the primary group of the workshop user
}; };
}; };
@@ -412,8 +426,12 @@ isoConfig // {
fi fi
fi fi
# Ensure abra is in PATH # Check abra installation
export PATH="$HOME/.local/bin:$PATH" if command -v abra >/dev/null 2>&1; then
echo " abra ready: $(which abra)"
else
echo " abra not found! Check: systemctl status workshop-abra-install"
fi
# Bash Completion Configuration # Bash Completion Configuration
_workshop_completion() { _workshop_completion() {
@@ -464,7 +482,7 @@ isoConfig // {
# Add server # Add server
if ! abra server ls 2>/dev/null | grep -q "workshop.local"; then if ! abra server ls 2>/dev/null | grep -q "workshop.local"; then
echo "🏗 Adding workshop.local server..." echo "🗄 Adding workshop.local server..."
abra server add workshop.local 2>/dev/null || abra server add --local abra server add workshop.local 2>/dev/null || abra server add --local
fi fi
@@ -594,15 +612,6 @@ isoConfig // {
fi fi
} }
abra-status() {
systemctl status workshop-abra-install
}
abra-logs() {
journalctl -u workshop-abra-install -f
}
help() { help() {
echo "🚀 CODE CRISPIES Workshop Commands:" echo "🚀 CODE CRISPIES Workshop Commands:"
echo "" echo ""
@@ -618,9 +627,9 @@ isoConfig // {
echo " Available: ${serverList}" echo " Available: ${serverList}"
echo "" echo ""
echo "🔍 Debug:" echo "🔍 Debug:"
echo " abra-status - Check setup service"
echo " docker service ls - List running services" echo " docker service ls - List running services"
echo " systemctl status dnsmasq - Check DNS" echo " systemctl status dnsmasq - Check DNS"
echo " systemctl status workshop-abra-install - Check abra installation"
echo "" echo ""
echo "📚 Learning Flow:" echo "📚 Learning Flow:"
echo " 1. setup-traefik" echo " 1. setup-traefik"