diff --git a/README.md b/README.md index 7008ae9..d4c9d2f 100644 --- a/README.md +++ b/README.md @@ -4,33 +4,54 @@ Linux-Dualboot-Rollout auf Toms drei Arbeitsrechnern, parallel zu Windows. ## Zielgeräte -| Host | Rolle | Hardware (TBD) | Status | -|------|-------|----------------|--------| -| Notebook | mobile Arbeit | — | geplant | -| PC | Hauptrechner | — | geplant | -| Werkstatt-PC | Werkstatt | — | geplant | +| Host | Rolle | Hardware | Status | +|------|-------|----------|--------| +| notebook | mobile Arbeit | TBD | geplant | +| pc | Hauptrechner | TBD | geplant | +| werkstatt | Werkstatt-PC | TBD | geplant | -## Anforderungen +> Hardware-Inventar wird pro Host in `ansible/host_vars/.yml` gepflegt. -- Dualboot neben bestehender Windows-Installation -- Schlankes System, KDE Plasma als Desktop -- Identische Konfiguration auf allen drei Maschinen (soweit sinnvoll) -- Integration in vorhandene LAN-Infrastruktur (`egonetix.lan` / `egonlebt.lan`) +## Entscheidungen -## Distribution +- **Distribution:** Debian 13 "Trixie" Stable mit KDE Plasma 6 (Netinstall, `firmware-netinst`) +- **Konfigurationsmanagement:** Ansible-Playbook (in `ansible/`) +- **Bootloader/Dualboot:** GRUB neben bestehendem Windows-Bootloader; `os-prober` aktiviert -Auswahl steht noch aus — siehe `docs/distro-auswahl.md` (folgt). +Begründung siehe `docs/distro-auswahl.md`. -## Struktur (geplant) +## Struktur ``` linux-workstations/ ├── README.md -├── docs/ # Entscheidungen, Vergleich, Installationsnotizen -├── install/ # Preseed/Autoinstall-Konfigs, Partitionierungsskripte -├── postinstall/ # Provisioning (Pakete, Dotfiles, Hardening) -└── per-host/ # Maschinenspezifische Overrides - ├── notebook/ - ├── pc/ - └── werkstatt/ +├── docs/ +│ └── distro-auswahl.md # ADR Distribution +├── install/ # Netinstall-Preseed, Partitionierungsnotizen (folgt) +└── ansible/ + ├── ansible.cfg + ├── inventory.yml + ├── site.yml # Top-Level Playbook + ├── group_vars/all.yml + ├── host_vars/{notebook,pc,werkstatt}.yml + └── roles/ + ├── base/ # Grundsystem, APT-Quellen, Firmware + ├── desktop_kde/ # KDE Plasma + Anwendungen + ├── hardening/ # SSH, UFW, unattended-upgrades + ├── dev_tools/ # Editor, Git, Sprachen + └── workstation_apps/ # Browser, Office, Mediencodecs ``` + +## Workflow + +```bash +# Auf einem Zielrechner nach Erstinstallation: +ssh-copy-id tom@notebook +ansible -i ansible/inventory.yml notebook -m ping +ansible-playbook -i ansible/inventory.yml ansible/site.yml --limit notebook +``` + +## Repo + +- Gitea: http://docker.egonlebt.lan:3000/egon/linux-workstations +- Eingebunden als Submodule in `claude-workspace` diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg new file mode 100644 index 0000000..b9d4a0f --- /dev/null +++ b/ansible/ansible.cfg @@ -0,0 +1,10 @@ +[defaults] +inventory = inventory.yml +host_key_checking = False +retry_files_enabled = False +stdout_callback = yaml +roles_path = roles +interpreter_python = auto_silent + +[ssh_connection] +pipelining = True diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml new file mode 100644 index 0000000..4d8056e --- /dev/null +++ b/ansible/group_vars/all.yml @@ -0,0 +1,15 @@ +--- +# Defaults für alle Workstations +timezone: Europe/Berlin +locale: de_DE.UTF-8 +keyboard_layout: de + +# APT +apt_components: + - main + - contrib + - non-free-firmware +enable_backports: true + +# Benutzer +primary_user: tom diff --git a/ansible/host_vars/notebook.yml b/ansible/host_vars/notebook.yml new file mode 100644 index 0000000..c62d451 --- /dev/null +++ b/ansible/host_vars/notebook.yml @@ -0,0 +1,7 @@ +--- +# Hardware: TBD +# Besonderheiten Notebook: Akku-Management, WLAN-Firmware, Suspend +extra_packages: + - tlp + - powertop + - firmware-iwlwifi # bei Intel-WLAN diff --git a/ansible/host_vars/pc.yml b/ansible/host_vars/pc.yml new file mode 100644 index 0000000..3c10fef --- /dev/null +++ b/ansible/host_vars/pc.yml @@ -0,0 +1,3 @@ +--- +# Hardware: TBD +extra_packages: [] diff --git a/ansible/host_vars/werkstatt.yml b/ansible/host_vars/werkstatt.yml new file mode 100644 index 0000000..de2df0d --- /dev/null +++ b/ansible/host_vars/werkstatt.yml @@ -0,0 +1,4 @@ +--- +# Hardware: TBD +# Werkstatt-Rolle: ggf. CAD-Viewer, Druckdienste, weniger Multimedia +extra_packages: [] diff --git a/ansible/inventory.yml b/ansible/inventory.yml new file mode 100644 index 0000000..7bfef3e --- /dev/null +++ b/ansible/inventory.yml @@ -0,0 +1,13 @@ +all: + children: + workstations: + hosts: + notebook: + ansible_host: notebook.egonlebt.lan + pc: + ansible_host: pc.egonlebt.lan + werkstatt: + ansible_host: werkstatt.egonlebt.lan + vars: + ansible_user: tom + ansible_become: true diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml new file mode 100644 index 0000000..1cc22d1 --- /dev/null +++ b/ansible/roles/base/tasks/main.yml @@ -0,0 +1,3 @@ +--- +# Grundsystem: APT-Quellen, Lokalisierung, Firmware, Hilfspakete +# TODO: implementieren — Skeleton-Datei diff --git a/ansible/roles/desktop_kde/tasks/main.yml b/ansible/roles/desktop_kde/tasks/main.yml new file mode 100644 index 0000000..52e3ac7 --- /dev/null +++ b/ansible/roles/desktop_kde/tasks/main.yml @@ -0,0 +1,3 @@ +--- +# KDE Plasma 6, SDDM, KDE-Anwendungen +# TODO: implementieren — Skeleton-Datei diff --git a/ansible/roles/dev_tools/tasks/main.yml b/ansible/roles/dev_tools/tasks/main.yml new file mode 100644 index 0000000..3ec1b20 --- /dev/null +++ b/ansible/roles/dev_tools/tasks/main.yml @@ -0,0 +1,3 @@ +--- +# Git, Editor, Sprachen (Python/Node/Perl für FHEM) +# TODO: implementieren — Skeleton-Datei diff --git a/ansible/roles/hardening/tasks/main.yml b/ansible/roles/hardening/tasks/main.yml new file mode 100644 index 0000000..5c7f4d4 --- /dev/null +++ b/ansible/roles/hardening/tasks/main.yml @@ -0,0 +1,3 @@ +--- +# SSH-Hardening, UFW, unattended-upgrades, fail2ban +# TODO: implementieren — Skeleton-Datei diff --git a/ansible/roles/workstation_apps/tasks/main.yml b/ansible/roles/workstation_apps/tasks/main.yml new file mode 100644 index 0000000..9799787 --- /dev/null +++ b/ansible/roles/workstation_apps/tasks/main.yml @@ -0,0 +1,3 @@ +--- +# Browser, Office, Multimedia-Codecs +# TODO: implementieren — Skeleton-Datei diff --git a/ansible/site.yml b/ansible/site.yml new file mode 100644 index 0000000..e779de3 --- /dev/null +++ b/ansible/site.yml @@ -0,0 +1,10 @@ +--- +- name: Provision Linux workstations + hosts: workstations + gather_facts: true + roles: + - base + - desktop_kde + - hardening + - dev_tools + - workstation_apps diff --git a/docs/distro-auswahl.md b/docs/distro-auswahl.md new file mode 100644 index 0000000..5fa5fa9 --- /dev/null +++ b/docs/distro-auswahl.md @@ -0,0 +1,39 @@ +# Distributionsauswahl + +## Entscheidung + +**Debian 13 "Trixie" Stable** mit **KDE Plasma 6**, installiert via offiziellem **Netinstall-ISO**. + +## Kontext + +Drei Geräte (Notebook, Haupt-PC, Werkstatt-PC) sollen Linux **parallel zu Windows** bekommen. Anforderungen: + +- schlankes System, keine Bloatware +- KDE Plasma als Desktop +- möglichst identische Basis auf allen drei Maschinen → reproduzierbar +- Integration in bestehende selbst gehostete Infrastruktur (Gitea, SSH, später ggf. eigene APT-Repos) +- langfristige Pflege ohne Vendor-Abhängigkeit + +## Bewertete Alternativen + +| Distro | Pro | Contra | Verworfen, weil | +|---|---|---|---| +| **Debian 13 + KDE** | reines Debian, planbare Releases, Netinstall = schlank, riesige Community, kein Telemetrie-/Snap-Overhead | manuelle Konfiguration nötig (Codecs, Firmware) | ✅ **gewählt** | +| Kubuntu 24.04 LTS | bequem, beste HW-Erkennung, 5 Jahre Support | Snap-Pakete, Canonical-Telemetrie, kein reines Debian | nicht puristisch genug, Snap unerwünscht | +| MX Linux KDE | Debian-Basis, vorkonfiguriert, MX-Snapshots für Klone | eigener Init-/Repo-Stack überlagert Debian, kleinere Community | Mehrwert vs. Plain Debian gering, sobald Ansible vorhanden | +| Spiral Linux KDE | Debian mit Sane Defaults | Solo-Maintainer → Pflegerisiko | zu hohes Bus-Faktor-Risiko | + +## Konsequenzen + +- **Installation:** Netinstall-ISO, Task `KDE Plasma` abwählen oder bewusst auswählen, Firmware-Variante (`firmware-netinst`) nehmen wegen WLAN/Grafik +- **Postinstall** läuft komplett über Ansible (Repo `ansible/`) +- **Codecs/Firmware:** über `contrib`/`non-free-firmware` APT-Komponenten +- **Backports** aktivieren für punktuell neuere Pakete (Kernel, Mesa) falls Hardware das braucht +- **Updates:** Stable-Modell → Sicherheitsupdates automatisch (`unattended-upgrades`), Feature-Updates beim Release-Wechsel + +## Offene Punkte + +- Filesystem-Layout: ext4 oder Btrfs+Snapper? — TBD nach Hardware-Inventar +- Disk-Encryption (LUKS): pro Gerät entscheiden (Notebook ja, Werkstatt ggf. nein) +- Display-Manager: SDDM (KDE-Standard) → vorerst behalten +- Wayland oder X11 als Default — Plasma 6 ist Wayland-first, daran orientieren