-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsystem.yaml
More file actions
100 lines (95 loc) · 3.88 KB
/
system.yaml
File metadata and controls
100 lines (95 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
- defaults:
link:
relink: true
force: true
- clean: ["~"]
- link:
/lib/udev/rules.d/60-android.rules: rules.d/60-android.rules
/etc/sysctl.d/50-inotify.conf: sysctl.d/50-inotify.conf
- shell:
- command: |
if command -v pacman >/dev/null 2>&1; then
# Arch Linux setup
sudo pacman -Syu --noconfirm
# Install packages from list (failures will be non-fatal)
grep -v '^#\|^$' packages_arch.txt | xargs -r sudo pacman -S --needed --noconfirm || true
else
# Ubuntu/Debian setup
sudo add-apt-repository -y ppa:longsleep/golang-backports
sudo add-apt-repository -y ppa:git-core/ppa
sudo add-apt-repository -y ppa:zhangsongcui3371/fastfetch
sudo apt update
grep -v '^#\|^$' packages.txt | xargs sudo apt install -y
# Install stable Rust toolchain via rustup (never use apt's cargo/rustc)
if command -v rustup >/dev/null 2>&1; then
echo "Installing Rust stable toolchain..."
rustup toolchain install stable
if [ -f "$HOME/.cargo/env" ]; then
source "$HOME/.cargo/env"
echo "Installing Rust CLI tools..."
grep -v '^#\|^$' cargo-tools.txt | sed 's/#.*//' | xargs cargo install
fi
fi
# Install Podman on Ubuntu/Debian (if not using Arch)
if ! command -v podman >/dev/null 2>&1; then
echo "Installing Podman..."
sudo apt install -y podman podman-docker buildah skopeo
fi
fi
stderr: true
stdout: true
- command: |
if command -v update-alternatives >/dev/null 2>&1; then
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
fi
stderr: true
stdout: true
- command: |
# Configure rootless Podman: UID/GID subordinate ranges
if command -v podman >/dev/null 2>&1; then
USER_NAME=$(logname 2>/dev/null || echo "$SUDO_USER")
if [ -n "$USER_NAME" ]; then
if ! grep -q "^${USER_NAME}:" /etc/subuid 2>/dev/null; then
sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 "$USER_NAME"
echo "Configured subuid/subgid ranges for $USER_NAME"
fi
fi
fi
stderr: true
stdout: true
description: "Configuring rootless container UID/GID mapping"
- command: |
# Install Docker Hub as default unqualified registry (system-wide)
REGISTRY_CONF="/etc/containers/registries.conf.d/10-unqualified-search.conf"
if [ ! -f "$REGISTRY_CONF" ]; then
mkdir -p /etc/containers/registries.conf.d
echo 'unqualified-search-registries = ["docker.io"]' > "$REGISTRY_CONF"
echo "Configured Docker Hub as default registry"
fi
stderr: true
stdout: true
description: "Configuring container registry defaults"
- command: |
# Install Kind for Kubernetes local clusters (not in official repos)
if ! command -v kind >/dev/null 2>&1; then
echo "Installing kind from GitHub releases..."
KIND_VERSION="v0.31.0"
ARCH=$(uname -m)
case "$ARCH" in
x86_64) KIND_ARCH="amd64" ;;
aarch64) KIND_ARCH="arm64" ;;
*) echo "Unsupported architecture: $ARCH"; exit 0 ;;
esac
curl -Lo ./kind "https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-${KIND_ARCH}"
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
echo "kind ${KIND_VERSION} installed successfully"
fi
stderr: true
stdout: true
description: "Installing Kind for local Kubernetes clusters"
- shell:
- mkdir -p ~/.config/fastfetch
- link:
~/.config/fastfetch/config.jsonc: fastfetch/config.jsonc