Commit Graph
48 Commits
Author SHA1 Message Date
bchanot a12cbab97a Merge feature/tmux-before-router into develop 2026-10-15 00:54:34 +02:00
bchanot c9e6ba3013 chore(memory): journal — tmux before dtach menu 2026-10-15 00:53:28 +02:00
bchanot 30588892ae feat(shell): SSH login enters tmux before the dtach menu
Interactive SSH shell outside tmux and outside a VS Code terminal now execs
tmux new-session -A -s main; the shell inside tmux re-reads the rc and opens
the dtach-router menu there, so it no longer has to be quit and reopened.
2026-10-15 00:53:22 +02:00
bchanot 91bbe059ec Merge feature/rust-toolchain into develop 2026-10-13 00:05:36 +02:00
bchanot 2ca06763c0 chore(memory): journal — rust toolchain at install 2026-10-12 23:35:49 +02:00
bchanot 7d62da44b0 feat(install): Rust toolchain via rustup, cargo env sourced by the rc files
install_rust(): official rustup script as the user (stable, default profile,
--no-modify-path), rustup update on a re-run, rust-analyzer + rust-src added.
libssl-dev (apt) / openssl@3 (brew) for openssl-sys crates. bashrc-linux,
bashrc-osx and zshrc-osx source ~/.cargo/env when present. README, CHANGELOG,
CLAUDE.md, TODO plan.
2026-10-12 23:35:39 +02:00
bchanot f825caf094 Merge bugfix/sshd-reload-inactive into develop 2026-10-12 21:32:37 +02:00
bchanot c9d47ce91d chore(memory): LRN-018 + journal — hotfix sshd-reload-inactive 2026-10-12 21:24:09 +02:00
bchanot 9d8347f58f docs: README step 13 sshd reload guard + CHANGELOG Fixed — hotfix sshd-reload-inactive 2026-10-12 21:23:59 +02:00
bchanot 64f06bbbbc fix(install): sshd hardening no longer aborts when ssh.service is inactive
harden_sshd ended with an unconditional 'systemctl reload ssh'. On WSL (and any
host where sshd was never started) the unit is inactive, systemctl exits with
'ssh.service is not active, cannot reload.' and set -e killed the whole install
right after the drop-in was validated.

- reload only when 'systemctl is-active --quiet ssh'; else say the drop-in is in
  place and applies at the next sshd start
- try-reload-or-restart instead of reload: exits 0 if sshd stopped in between
- create /run/sshd before 'sshd -t': on Ubuntu 24.04 the privsep dir only exists
  while ssh.service runs, so the validation failed on an inactive host and the
  valid drop-in was removed as 'rejected'
2026-10-12 01:14:40 +02:00
bchanot e82af805fa Merge feature/desktop-rdp-prompt into develop 2026-10-12 00:52:17 +02:00
bchanot 64f7d92b0b chore(memory): journal — desktop/RDP offer, WSL 2026-10-11 23:37:15 +02:00
bchanot 5d602696d5 feat(install): offer GNOME desktop and RDP remote login instead of forcing them, default no on WSL
ubuntu-desktop-minimal and gnome-remote-desktop were installed unconditionally
in the Linux block. On WSL they are useless (Windows owns the display) and the
desktop's NetworkManager/systemd-resolved rewrite /etc/resolv.conf, which lost
DNS mid-install (fail2ban/whois fetch failed on 'Temporary failure resolving').

- confirm() takes an optional default (y → [Y/n], Enter = yes, no tty = yes)
- is_wsl(): WSL_DISTRO_NAME or 'microsoft' in /proc/version
- offer_desktop(): desktop [Y/n], then RDP [Y/n]; WSL flips both to [y/N]
- README step 11 + table + packages, CHANGELOG Unreleased
2026-10-11 23:37:05 +02:00
bchanot 40b72f85c4 Merge feature/docker-rootless into develop 2026-10-09 00:28:52 +02:00
bchanot de6fa1659c feat(install): rootless Docker offer disables the rootful daemon first
docker.service + docker.socket disabled and /var/run/docker.sock removed before
dockerd-rootless-setuptool.sh install, as the docs recommend; skipped when no
rootful unit exists.
2026-10-09 00:28:51 +02:00
bchanot 6882aa7c14 chore(memory): journal — feat docker-rootless 2026-10-09 00:26:26 +02:00
bchanot eb7a75182e feat(install): offer rootless Docker at the end of the Linux install
docker-ce-rootless-extras joins the Docker package list; offer_docker_rootless
installs uidmap/dbus-user-session/slirp4netns, runs dockerd-rootless-setuptool.sh
install (apt variant: /usr/bin, no PATH export) and enables linger. The rootful
daemon is left alone. bashrc-linux exports DOCKER_HOST only when the user socket
exists. README step 16 + package lists.
2026-10-09 00:26:26 +02:00
bchanot 9eea9782d1 chore(githooks): refresh post-commit/post-merge from the lib (fail-closed autopush read) 2026-10-09 00:26:25 +02:00
bastien 1a4f8d4715 Merge feature/apt-packages into develop 2026-09-28 21:57:04 +02:00
bastien ba1817a4e9 chore(memory): BDR-014 apt mirror choices, LRN-013 gitleaks version probe 2026-09-28 21:57:03 +02:00
bastien 3c5b1ece6e chore(memory): journal — apt packages feature, gitleaks hook fix 2026-09-28 21:41:27 +02:00
bastien 9e49b9d92c chore(githooks): refresh pre-commit (gitleaks protect fallback) + track reference-transaction 2026-09-28 21:41:06 +02:00
bastien 0bc9e3f467 feat(install): mirror this machine's apt packages
gitleaks, web stack (mariadb-server, imagemagick, unversioned php-* modules),
ubuntu-desktop-minimal before the RDP setup, and a lspci-gated
install_nvidia_driver() that runs ubuntu-drivers install. README + TODO updated.
2026-09-28 21:41:05 +02:00
bastien 58adb28ec2 chore(memory): journal, branch cleanup + gitea-deploy split out 2026-09-22 18:03:46 +02:00
bastien a42e8f6024 chore(githooks): refresh pre-commit/post-commit/post-merge from the lib (gitleaks backstop, autopush) 2026-09-22 17:55:41 +02:00
bastien cfd144d158 chore(memory): journal, security baseline merged 2026-09-22 17:53:53 +02:00
bastien a6c416e1cf Merge feature/security-baseline into develop 2026-09-22 17:53:46 +02:00
bastien 26c8e345c5 chore(memory): BDR-013 security baseline, LRN-012 fail2ban port vs allports, journal 2026-09-22 17:47:35 +02:00
bastien 55ede6f08c feat(install): security baseline: fail2ban, unattended-upgrades, sshd hardening
Always applied in the Linux block, no prompt, idempotent:
- install_fail2ban: fail2ban + nftables, etc/fail2ban/jail.d/local.conf.
  sshd jail reads the journal (backend systemd, works with or without
  auth.log) and bans the offender on every port, so the SSH port is
  irrelevant: the previous server's jail banned 22 while sshd listened
  on 337. 5 failures / 10 min / 1 h. Loopback + RFC1918 never banned.
- install_unattended_upgrades: package + 20auto-upgrades (the file
  dpkg-reconfigure writes, without the prompt).
- harden_sshd: sshd_config.d/20-hardening.conf (PermitRootLogin no,
  MaxAuthTries 3, LoginGraceTime 20), sshd -t gated: a rejected file is
  removed and the install continues with a warning. Auth methods, port
  and user lists untouched.
Docs: README table + step 13 + packages, CLAUDE.md layout.
2026-09-22 17:47:34 +02:00
bastien 0d2e96819a chore(memory): journal 2026-09-22, round-2 TODO closed 2026-09-22 17:35:05 +02:00
bastien 836bb675bf Merge feature/tmp-disk-ssh-oom-cloudpex into develop 2026-09-22 17:34:31 +02:00
bastien 6e38c3b6cf Merge main into develop 2026-09-22 17:34:30 +02:00
bastien a9f7b6437f chore(memory): capitalize /tmp on disk, SSH guard, cloudpex conf (BDR-010..012, LRN-009..011, BLK-005/006, EVAL-002) 2026-09-22 17:34:18 +02:00
bastien 4f8bb61458 feat(cloudpex): site values out of the script, prompted at install into /etc/cloudpex.conf
cloudpex/cloudpex no longer carries the NAS host, share name, SMB user,
mount point or SMB version. It reads /etc/cloudpex.conf (root:root 0600,
KEY=value) line by line, never sources it, and dies with a hint when the
file is missing, incomplete or has a relative mount point.

cloudpex/install.sh prompts for the five values (regex-validated, re-asked
on bad input so the main installer never aborts), shows and keeps an
existing config unless answered n, and skips the config when no terminal
is attached. README (FR) + root README + CLAUDE.md updated.
2026-09-22 17:34:18 +02:00
bastien 872079bafb feat(install): offer /tmp on disk + SSH memory guard, deploy cloudpex helper
/tmp is a RAM-backed tmpfs on Ubuntu (50% of RAM). Agent runs fill it: half
the RAM goes, then every temp-file creation fails with ENOSPC and shells
break. Swap does not lift the cap, so the fix is /tmp on disk.

End-of-install offers (Linux, [y/N], skipped without a terminal, idempotent):
- offer_tmp_on_disk: mask tmp.mount + etc/tmpfiles.d/tmp.conf (wipe at
  boot, 10-day purge, /var/tmp rule kept). Effective at next reboot.
- offer_ssh_memory_guard: the previous server's rules. ssh.service drop-in
  (OOMScoreAdjust=-1000, MemoryMin=256M) + earlyoom with --avoid sshd and
  --prefer node/java. MemoryMin covers sshd only; earlyoom is the real guard.

install_cloudpex deploys the NAS mount helper in the Linux block.
Docs: README steps 12-14 + table, CLAUDE.md layout + lint command.
2026-09-22 16:57:08 +02:00
bastien 9dacef3823 feat(cloudpex): track the on-demand SMB mount helper, add installer + README
cloudpex/cloudpex mounts //192.168.1.111/CloudPex on /mnt/cloudpex on demand
(password prompted, nothing stored, noexec/nosuid/nodev, dir_mode 0750).
cloudpex/install.sh reproduces the live deployment: /usr/local/bin/cloudpex
root:root 0755, /mnt/cloudpex, cifs-utils if mount.cifs is missing.
README (FR) explains why on-demand and not fstab (RECOVERY doc 04).
2026-09-22 16:57:08 +02:00
bastien a210d0173b added correct dtach 2026-09-22 02:07:49 +00:00
bastien 3085b86828 test hook fix 2026-05-15 22:16:24 +02:00
bastien 2a56874597 test hook fix 2026-05-15 22:14:04 +02:00
bastien 3509b62187 test hook fix 2026-05-15 22:13:21 +02:00
bastien ac1b733e8a test hook fix 2026-05-15 22:06:07 +02:00
bastien 63e6b61437 test mirror 2026-05-15 21:52:29 +02:00
bastien 5fd27b35f4 added nerdtree to iunstall 2025-12-11 17:03:50 +01:00
bastien 628e6d9aa0 added vim 2025-12-11 16:53:30 +01:00
bastien f3541a6446 delete pipi 2025-12-11 16:51:30 +01:00
bastien ecd845d5ef added install.sh 2025-12-11 16:33:12 +01:00
bastien 741612366a add bash 2025-12-11 16:32:41 +01:00
bastien e7b8acf313 test 2025-12-11 16:30:02 +01:00