chore: rename project from myLinux to Linux_post_install across all files
- Resolved merge conflicts in README.md, DEV.md, postinstall.sh - Updated all docs to use Linux_post_install - Changed runtime paths (/usr/local/share/, ~/.config/, ~/.local/share/) - Updated Docker labels (mylinux.vbox -> linux_post_install.vbox) - Fixed clone URL to gitea.skink-platy.ts.net
This commit is contained in:
+12
-12
@@ -1,4 +1,4 @@
|
||||
# AGENT Context — myLinux Project
|
||||
# AGENT Context — Linux_post_install Project
|
||||
|
||||
> **Purpose:** Single-source context document so any AI agent can understand the project, navigate the codebase, and make correct contributions.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
## 1. Project Overview
|
||||
|
||||
**myLinux** is a personal bootstrap and homelab toolkit for Debian/Ubuntu. One command turns a bare install into a fully productive machine:
|
||||
**Linux_post_install** is a personal bootstrap and homelab toolkit for Debian/Ubuntu. One command turns a bare install into a fully productive machine:
|
||||
|
||||
- Automated system package installation (25+ packages)
|
||||
- A unified CLI (`pos`) for network, Docker, media, system, and SSH tasks
|
||||
@@ -14,7 +14,7 @@
|
||||
- Docker Compose service management via ScaleTail templates (119+ self-hosted services with Tailscale sidecar)
|
||||
- Systemd service management for boot-time automation
|
||||
|
||||
**Repository:** `https://github.com/IFindMe/myLinux`
|
||||
**Repository:** `https://gitea.skink-platy.ts.net/admin/Linux_post_install`
|
||||
**Target OS:** Debian / Ubuntu (uses `apt`)
|
||||
**Shell:** Bash (`#!/usr/bin/env bash`)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
## 2. Directory Structure
|
||||
|
||||
```
|
||||
myLinux/
|
||||
Linux_post_install/
|
||||
├── install.sh # Main orchestrator — entry point
|
||||
├── preinstall.sh # Phase 1: system packages via apt + yt-dlp
|
||||
├── postinstall.sh # Phase 3: PATH, bash completion, systemd services
|
||||
@@ -112,13 +112,13 @@ User runs: ./install.sh [--apps|--full|--dry-run|--skip <phase>|--steps <spec>]
|
||||
│ └─ Copies systemd/*.service → /etc/systemd/system/, enables them
|
||||
│
|
||||
├─ Phase 4: ScaleTail clone
|
||||
│ └─ Shallow-clones ScaleTail templates to /usr/local/share/mylinux/scale-tail
|
||||
│ └─ Shallow-clones ScaleTail templates to /usr/local/share/linux_post_install/scale-tail
|
||||
│
|
||||
└─ [if --apps or --full]: apps/install.sh
|
||||
└─ Interactive picker (or --all for non-interactive)
|
||||
```
|
||||
|
||||
**After install, the repo can be deleted** — all tools live in `/usr/local/bin/` and templates in `/usr/local/share/mylinux/`.
|
||||
**After install, the repo can be deleted** — all tools live in `/usr/local/bin/` and templates in `/usr/local/share/linux_post_install/`.
|
||||
|
||||
### install.sh Flags
|
||||
|
||||
@@ -133,7 +133,7 @@ User runs: ./install.sh [--apps|--full|--dry-run|--skip <phase>|--steps <spec>]
|
||||
|
||||
### pos Output Logging
|
||||
|
||||
All non-interactive `pos` commands log output to `~/.local/share/mylinux/logs/`:
|
||||
All non-interactive `pos` commands log output to `~/.local/share/linux_post_install/logs/`:
|
||||
- Per-command files: `YYYYMMDD_HHMMSS_pos_<cmd>.log` (full stdout+stderr)
|
||||
- Main log: `pos.log` (command + timestamp + exit code for every invocation)
|
||||
- Interactive commands (`system-firewall`, `media-mp4`) only log invocation, not output
|
||||
@@ -181,8 +181,8 @@ These forward to `pos` transparently: `wr-ip`, `wr-checkport`, `wr-scan-ping`, `
|
||||
|
||||
`pos-vbox` manages disposable Docker containers as lightweight VMs:
|
||||
|
||||
- **Container labeling:** All created containers get `mylinux.vbox=true` label
|
||||
- **`ls` filtering:** `docker ps --filter label=mylinux.vbox=true` — only shows vbox-managed containers
|
||||
- **Container labeling:** All created containers get `linux_post_install.vbox=true` label
|
||||
- **`ls` filtering:** `docker ps --filter label=linux_post_install.vbox=true` — only shows vbox-managed containers
|
||||
- **Post-create prompt:** After `create`, asks "Enter now? [Y/n]" using `confirm` helper
|
||||
- **Working dir detection:** `enter` auto-detects bind mount path from container labels
|
||||
- **Custom dirs:** `--dir <path>` or `--dir .` for current directory
|
||||
@@ -224,12 +224,12 @@ source "$(dirname "$0")/../lib/common.sh"
|
||||
ScaleTail provides 119+ Docker Compose templates with a Tailscale sidecar pattern (`network_mode: service:tailscale`). Each service gets a `tail-xxxxx.ts.net` URL with optional automatic HTTPS.
|
||||
|
||||
```
|
||||
/usr/local/share/mylinux/scale-tail/ # Templates (git repo)
|
||||
/usr/local/share/linux_post_install/scale-tail/ # Templates (git repo)
|
||||
└── services/<name>/
|
||||
├── compose.yaml
|
||||
└── .env
|
||||
|
||||
~/.config/mylinux/compose.env # Global defaults (TS_AUTHKEY, TZ, DNS_SERVER, SERVICES_BASE)
|
||||
~/.config/linux_post_install/compose.env # Global defaults (TS_AUTHKEY, TZ, DNS_SERVER, SERVICES_BASE)
|
||||
|
||||
/srv/<service>/ # Active deployments (default base)
|
||||
├── compose.yaml # From template (refreshed on update)
|
||||
@@ -308,7 +308,7 @@ All `.service` files in `systemd/` are automatically copied to `/etc/systemd/sys
|
||||
|
||||
### Runtime Config
|
||||
|
||||
- `~/.config/mylinux/compose.env` — Docker Compose global defaults
|
||||
- `~/.config/linux_post_install/compose.env` — Docker Compose global defaults
|
||||
- `~/.bashrc` — Modified by postinstall (PATH, bash completion)
|
||||
|
||||
---
|
||||
|
||||
@@ -34,26 +34,16 @@ Each phase is independent and is only run if the corresponding file exists.
|
||||
| `bin/` | Daily-use tools and wrappers | `/usr/local/bin/` |
|
||||
| `apps/<category>/` | Optional desktop apps (by category) | run on demand |
|
||||
| `lib/` | Shared library (`common.sh`) | sourced at build time |
|
||||
<<<<<<< HEAD
|
||||
| `config/` | Static config files + SSH authorized_keys | `~/.config/<app>/` (via postinstall) |
|
||||
=======
|
||||
| `config/` | Static config files (gitignored — user adds their own) | `~/.config/<app>/` (via postinstall) |
|
||||
>>>>>>> bba577c (Initial commit)
|
||||
| `compose/` | ScaleTail templates (dev reference only) | cloned to `/usr/local/share/mylinux/scale-tail` on install |
|
||||
| `compose/` | ScaleTail templates (dev reference only) | cloned to `/usr/local/share/linux_post_install/scale-tail` on install |
|
||||
| `systemd/` | Systemd service unit files | `/etc/systemd/system/` (via postinstall) |
|
||||
|
||||
### Key Files Added
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
<<<<<<< HEAD
|
||||
| `.gitignore` | Prevents secrets (rclone tokens) and build artifacts from being committed |
|
||||
| `config/authorized_keys` | SSH public keys read by `postinstall.sh` (replaces hardcoded key) |ls
|
||||
|
||||
=======
|
||||
| `.gitignore` | Prevents secrets (rclone tokens, SSH keys) and build artifacts from being committed |
|
||||
>>>>>>> bba577c (Initial commit)
|
||||
| `~/.config/mylinux/compose.env` | Global Docker Compose defaults (`TS_AUTHKEY`, `TZ`, `DNS_SERVER`, `SERVICES_BASE`) — created by `wr-compose config` |
|
||||
| `~/.config/linux_post_install/compose.env` | Global Docker Compose defaults (`TS_AUTHKEY`, `TZ`, `DNS_SERVER`, `SERVICES_BASE`) — created by `wr-compose config` |
|
||||
|
||||
---
|
||||
|
||||
@@ -118,14 +108,11 @@ If the file contains secrets (tokens, keys):
|
||||
- Add it to `.gitignore`
|
||||
- Document in README how to create it manually
|
||||
|
||||
<<<<<<< HEAD
|
||||
### 4. Add SSH keys (if needed)
|
||||
|
||||
Place public keys in `config/authorized_keys` (one per line).
|
||||
`postinstall.sh` reads from this file automatically.
|
||||
|
||||
=======
|
||||
>>>>>>> bba577c (Initial commit)
|
||||
### 5. Update README.md
|
||||
|
||||
Add a section under **Tools Reference** following the existing format.
|
||||
@@ -319,17 +306,17 @@ fi
|
||||
|
||||
## Working with Docker Compose
|
||||
|
||||
The installer clones [ScaleTail](https://github.com/tailscale-dev/ScaleTail) templates to `/usr/local/share/mylinux/scale-tail/` — a library of 119+ self-hosted services with a **Tailscale sidecar** pattern. Each service runs with `network_mode: service:tailscale`, gets a `tail-xxxxx.ts.net` URL, and optional automatic HTTPS via Tailscale Serve or Funnel.
|
||||
The installer clones [ScaleTail](https://github.com/tailscale-dev/ScaleTail) templates to `/usr/local/share/linux_post_install/scale-tail/` — a library of 119+ self-hosted services with a **Tailscale sidecar** pattern. Each service runs with `network_mode: service:tailscale`, gets a `tail-xxxxx.ts.net` URL, and optional automatic HTTPS via Tailscale Serve or Funnel.
|
||||
|
||||
### Architecture (after install)
|
||||
|
||||
```
|
||||
/usr/local/share/mylinux/scale-tail/ # ScaleTail templates (git repo)
|
||||
/usr/local/share/linux_post_install/scale-tail/ # ScaleTail templates (git repo)
|
||||
└── services/<name>/
|
||||
├── compose.yaml # Service definition (Tailscale + app containers)
|
||||
└── .env # Template variables (SERVICE, IMAGE_URL, TS_AUTHKEY, TZ, ...)
|
||||
|
||||
~/.config/mylinux/compose.env # Global defaults — set via wr-compose config
|
||||
~/.config/linux_post_install/compose.env # Global defaults — set via wr-compose config
|
||||
|
||||
<SERVICES_BASE>/<name>/ # Active deployments (default: /srv/<name>)
|
||||
├── compose.yaml # Copied from template (refreshed on wr-compose update)
|
||||
@@ -345,11 +332,11 @@ The installer clones [ScaleTail](https://github.com/tailscale-dev/ScaleTail) tem
|
||||
| `wr-compose up <service>` | Deploys service to `$SERVICES_BASE/<service>/` (default: `/srv`), creates `config/` + `data/` dirs, generates `.env` from global config (prompts for `TS_AUTHKEY` if empty), runs `docker compose up -d` |
|
||||
| `wr-compose down <service>` | Runs `docker compose down` in the service directory |
|
||||
| `wr-compose update` | `git pull` in ScaleTail templates dir, then re-copies `compose.yaml` into all deployed directories — `.env` files are left untouched |
|
||||
| `wr-compose config set K=V` | Persists a value in `~/.config/mylinux/compose.env` (e.g. `TS_AUTHKEY`, `TZ`, `DNS_SERVER`, `SERVICES_BASE`) |
|
||||
| `wr-compose config set K=V` | Persists a value in `~/.config/linux_post_install/compose.env` (e.g. `TS_AUTHKEY`, `TZ`, `DNS_SERVER`, `SERVICES_BASE`) |
|
||||
|
||||
### Portable `.env` design
|
||||
|
||||
- **Global**: `~/.config/mylinux/compose.env` — one place for `TS_AUTHKEY`, `TZ`, `DNS_SERVER`, `SERVICES_BASE`.
|
||||
- **Global**: `~/.config/linux_post_install/compose.env` — one place for `TS_AUTHKEY`, `TZ`, `DNS_SERVER`, `SERVICES_BASE`.
|
||||
- **Per-service**: `<SERVICES_BASE>/<service>/.env` — generated from the ScaleTail template on first deploy, with empty values filled from the global config.
|
||||
- **On update**: `wr-compose update` refreshes only `compose.yaml` from the templates; `.env` files are preserved.
|
||||
- **Services path**: set `SERVICES_BASE` to any directory (e.g. `/srv`) via `wr-compose config set SERVICES_BASE=/srv`. Defaults to `/srv`.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# myLinux — Personal Bootstrap & Homelab Toolkit
|
||||
# Linux_post_install — Personal Bootstrap & Homelab Toolkit
|
||||
|
||||
> One command to turn a bare Debian/Ubuntu install into a usable machine.
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
git clone https://github.com/IFindMe/myLinux.git
|
||||
cd myLinux
|
||||
git clone https://gitea.skink-platy.ts.net/admin/Linux_post_install.git
|
||||
cd Linux_post_install
|
||||
./install.sh # core bootstrap + ScaleTail templates
|
||||
./install.sh --apps # core + interactive app picker
|
||||
./install.sh --full # core + all apps (non-interactive)
|
||||
@@ -29,7 +29,7 @@ cd myLinux
|
||||
./install.sh --apps --dry-run # preview without executing
|
||||
```
|
||||
|
||||
The machine returns to a productive state with minimal manual work. The installer copies all tools to `/usr/local/bin/` and clones ScaleTail templates to `/usr/local/share/mylinux/` — you can delete the repo after install, everything still works.
|
||||
The machine returns to a productive state with minimal manual work. The installer copies all tools to `/usr/local/bin/` and clones ScaleTail templates to `/usr/local/share/linux_post_install/` — you can delete the repo after install, everything still works.
|
||||
|
||||
---
|
||||
|
||||
@@ -47,7 +47,7 @@ The machine returns to a productive state with minimal manual work. The installe
|
||||
## Repository Structure
|
||||
|
||||
```
|
||||
myLinux/
|
||||
Linux_post_install/
|
||||
├── apps/ # Optional desktop applications (by category)
|
||||
│ ├── install.sh # Interactive selector (y/n per app)
|
||||
│ ├── browsers/
|
||||
@@ -86,15 +86,9 @@ myLinux/
|
||||
│ ├── vbox → pos # Backward-compat wrapper
|
||||
│ ├── ssh-load-all → pos# Backward-compat wrapper
|
||||
│ └── autostart.sh # Boot-time script (via systemd)
|
||||
<<<<<<< HEAD
|
||||
├── config/
|
||||
│ ├── authorized_keys # SSH public keys (read by postinstall)
|
||||
│ └── rclone.conf # rclone Google Drive config (gitignored)
|
||||
=======
|
||||
├── config/ # User config files (gitignored)
|
||||
│ ├── authorized_keys # SSH public keys (gitignored — add your own)
|
||||
│ └── rclone.conf # rclone config (gitignored — add your own)
|
||||
>>>>>>> bba577c (Initial commit)
|
||||
├── lib/
|
||||
│ └── common.sh # Shared library (colors, logging, spinner, timer)
|
||||
├── systemd/
|
||||
@@ -249,8 +243,8 @@ Applied by `postinstall.sh`:
|
||||
After reinstalling Debian or Ubuntu:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/IFindMe/myLinux.git
|
||||
cd myLinux
|
||||
git clone https://gitea.skink-platy.ts.net/admin/Linux_post_install.git
|
||||
cd Linux_post_install
|
||||
./install.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ args=("$@")
|
||||
n=${#args[@]}
|
||||
|
||||
# ── Logging setup ──────────────────────────────────────────────
|
||||
LOG_DIR="$HOME/.local/share/mylinux/logs"
|
||||
LOG_DIR="$HOME/.local/share/linux_post_install/logs"
|
||||
mkdir -p "$LOG_DIR" 2>/dev/null || true
|
||||
CMD_SAFE=$(echo "${args[*]}" | tr ' /' '__')
|
||||
LOG_FILE="$LOG_DIR/$(date +%Y%m%d_%H%M%S)_pos_${CMD_SAFE}.log"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
set -euo pipefail
|
||||
source "$(dirname "$0")/../lib/common.sh" 2>/dev/null || source "$(dirname "$0")/common.sh"
|
||||
|
||||
SCALE_DIR="/usr/local/share/mylinux/scale-tail/services"
|
||||
CONFIG_ENV="${HOME}/.config/mylinux/compose.env"
|
||||
SCALE_DIR="/usr/local/share/linux_post_install/scale-tail/services"
|
||||
CONFIG_ENV="${HOME}/.config/linux_post_install/compose.env"
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
@@ -217,7 +217,7 @@ cmd_update() {
|
||||
check_templates
|
||||
|
||||
log "Updating ScaleTail templates..."
|
||||
sudo git -C "/usr/local/share/mylinux/scale-tail" pull
|
||||
sudo git -C "/usr/local/share/linux_post_install/scale-tail" pull
|
||||
ok "Templates updated"
|
||||
|
||||
load_global_config
|
||||
|
||||
+2
-2
@@ -93,7 +93,7 @@ case "$cmd" in
|
||||
docker create \
|
||||
-it \
|
||||
--name "$name" \
|
||||
--label mylinux.vbox=true \
|
||||
--label linux_post_install.vbox=true \
|
||||
-v "$lab_dir:$lab_dir" \
|
||||
-w "$lab_dir" \
|
||||
"$image" \
|
||||
@@ -147,7 +147,7 @@ case "$cmd" in
|
||||
;;
|
||||
|
||||
ls)
|
||||
docker ps -a --filter label=mylinux.vbox=true --format "table {{.Names}}\t{{.Image}}\t{{.Status}}"
|
||||
docker ps -a --filter label=linux_post_install.vbox=true --format "table {{.Names}}\t{{.Image}}\t{{.Status}}"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -49,7 +49,7 @@ _pos() {
|
||||
}
|
||||
|
||||
_pos_complete_compose_services() {
|
||||
local scale_dir="/usr/local/share/mylinux/scale-tail/services"
|
||||
local scale_dir="/usr/local/share/linux_post_install/scale-tail/services"
|
||||
if [ -d "$scale_dir" ]; then
|
||||
local svcs=()
|
||||
for d in "$scale_dir"/*/; do
|
||||
@@ -69,7 +69,7 @@ _pos() {
|
||||
|
||||
_pos_complete_docker_vbox_names() {
|
||||
local names
|
||||
names=$(docker ps -a --filter label=mylinux.vbox=true --format '{{.Names}}' 2>/dev/null)
|
||||
names=$(docker ps -a --filter label=linux_post_install.vbox=true --format '{{.Names}}' 2>/dev/null)
|
||||
COMPREPLY=($(compgen -W "$names" -- "$cur"))
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -80,7 +80,7 @@ should_run() {
|
||||
return 0
|
||||
}
|
||||
|
||||
section "myLinux Bootstrap"
|
||||
section "Linux_post_install Bootstrap"
|
||||
timer_start
|
||||
|
||||
# ── Phase 1: preinstall ────────────────────────────────────────
|
||||
@@ -117,7 +117,7 @@ fi
|
||||
# ── Phase 4: ScaleTail templates ────────────────────────────────
|
||||
if should_run 4 scalepoint; then
|
||||
step 4 4 "Cloning ScaleTail templates"
|
||||
scale_dest="/usr/local/share/mylinux/scale-tail"
|
||||
scale_dest="/usr/local/share/linux_post_install/scale-tail"
|
||||
if [ ! -d "$scale_dest" ]; then
|
||||
spawn "Cloning ScaleTail" sudo git clone --depth 1 \
|
||||
https://github.com/tailscale-dev/ScaleTail.git "$scale_dest"
|
||||
|
||||
@@ -45,7 +45,6 @@ else
|
||||
warn "completions/pos.bash not found, skipping"
|
||||
fi
|
||||
|
||||
<<<<<<< HEAD
|
||||
# ── SSH authorized keys ────────────────────────────────────────
|
||||
SSH_DIR="$HOME/.ssh"
|
||||
AUTH_FILE="$SSH_DIR/authorized_keys"
|
||||
@@ -73,9 +72,6 @@ if [ -f "$KEY_FILE" ]; then
|
||||
else
|
||||
warn "config/authorized_keys not found, skipping SSH setup"
|
||||
fi
|
||||
|
||||
=======
|
||||
>>>>>>> bba577c (Initial commit)
|
||||
# ── systemd services ───────────────────────────────────────────
|
||||
if [ -d systemd ] && [ -n "$(ls -A systemd/*.service 2>/dev/null)" ]; then
|
||||
run sudo cp systemd/*.service /etc/systemd/system/
|
||||
|
||||
Reference in New Issue
Block a user