Commit Graph

4 Commits (61ff61d432d1d12b0618adeec7def2aa92954370)

Author SHA1 Message Date
Amir Alexander Abdelbaki 61ff61d432 fix(modules): guard remaining interactive prompts for unattended installs
Audited every module for prompts that would hang an answerfile/unattended run.
The EWW form-factor question and several interactive-config modules were still
unguarded (only hyprlua had been fixed):

- hyprland.sh, niri.sh: skip the EWW form-factor `read` when MARCHY_UNATTENDED=1
  or stdin is not a TTY, defaulting to the desktop/no-battery bar (matches hyprlua).
- mail-notmuch.sh, caldav-sync.sh: install the tools, then exit cleanly in
  unattended mode instead of blocking on the account/server credential prompts —
  the user configures the account after first boot.
- freeipa-server.sh: bail out early in unattended mode; FreeIPA server provisioning
  is interactive and must run on a booted system (ipa-server-install needs running
  services), so it can never run during the install.

freeipa-client.sh is left as-is: it has a genuine --unattended enrolment path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5kHioUMK3mtf2eiLEozCM
2026-06-27 02:09:04 +02:00
Amir Alexander Abdelbaki d445f965ce fix(modules): make service/session ops chroot-safe to prevent install aborts
When the TUI modules run inside the archiso installer chroot, the new
system's systemd is not the running init and there is no user session bus.
Operations like `systemctl start`, `enable --now`, `systemctl --user`, and
`gsettings` fail there and, under `set -e`, abort the whole module.

- logging.sh: add in_chroot/have_user_bus/enable_service/start_service
  helpers. enable_service warns instead of aborting; start_service skips in
  a chroot (unit starts on first boot via its enable symlink).
- core.sh, hyprland.sh, hyprlua.sh, niri.sh: route enables through
  enable_service, starts through start_service, and guard gsettings behind
  have_user_bus. Fixes the cronie-enable failure and the ly/DM setup abort.
- app modules (tlp, timeshift, open-webui, mysql, qemu, ollama, cockpit,
  docker, ssh-server): convert `enable --now`/plain enables to
  enable_service + start_service so they no longer abort during chroot install.
- tui-install.sh: run modules with output to a file plus a pid-bound tail,
  waiting on the module PID, so a daemon child inheriting the pipe can no
  longer hang the installer after a module (e.g. flatpak) finishes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5kHioUMK3mtf2eiLEozCM
2026-06-26 20:58:37 +02:00
Amir Alexander Abdelbaki 9638fd337a feat(hyprlua/niri): webcam presence detection + systemd-inhibit idle/caffeine
- Add presence-detect.sh daemon: checks webcam every 2 min via OpenCV haar
  cascade (presence_detect.py); holds systemd-inhibit --what=idle lock while a
  face is detected so hypridle never fires during an active session
- Add enroll-biometrics.sh: Cyberqueer dialog TUI for camera configuration/test
  and howdy face auth enrollment (add/list/remove/test models)
- Rewrite caffeine.sh (hyprlua + niri): replace kill/restart of idle daemon with
  systemd-inhibit --what=idle:sleep + PID file; idle daemon stays running
- Fix hypridle.conf: correct ;; → ; in after_sleep_cmd, add
  ignore_dbus_inhibit=false, bump lock timeout 120s→180s to account for the
  2-min presence detection cycle
- Wire Super+Shift+B keybind for enrollment TUI in both hyprlua and niri
- Fix niri/scripts/python: was real dir with inner symlink causing cp -rL to
  create a nested python/python/ hierarchy; replaced with direct symlink
- Add python-opencv and v4l-utils to hyprlua + niri installers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 14:50:36 +02:00
Amir Alexander Abdelbaki 7a40e9baec feat(niri): add Niri as a full desktop environment option
Adds Niri (scrollable-tiling Wayland compositor) as a first-class DE
alongside HyprLua, Hyprland, and Sway.

Config (desktopenvs/niri/):
- niri/config.kdl: full KDL config — input (de/caps:swapescape/
  left-handed), CyberQueer focus-ring colours, spring animations,
  environment vars, autostart, window rules, 100+ keybindings
  translated from binds.lua
- Shared configs (kitty, dunst, wofi, btop, walker, vicinae, etc.)
  symlinked from hyprlua to stay in sync
- EWW bar: three variants (PC/notebook/touch) with niri-native workspace
  widget driven by a niri msg event-stream listener script
- greetd-tuigreet: launches niri instead of Hyprland

Scripts adapted for niri IPC / niri toolchain:
- ewwstart.sh / togglebar.sh: niri msg outputs instead of hyprctl
- monitorhandler.sh: swaybg replaces hyprpaper
- caffeine.sh: swayidle replaces hypridle
- activewindow: niri msg -j focused-window
- unified-rotate.sh: niri msg action set-output-transform
- wallpaper-picker: swaybg-based rewrite
- windowswitcher: niri msg -j windows + wofi
- workspace: event-stream listener for eww literal widget
- drawer.sh / menu.sh: swaylock + niri msg action quit for power actions
- niri-toggle-touchpad.sh: xinput fallback (no niri IPC for touchpad)
- toggle-layout.sh: stub (niri has one scrollable layout)

Installer & integration:
- setup/modules/Desktop-Environments/niri.sh: full installer with
  niri-appropriate packages (swaybg, swaylock, swayidle, xfce-polkit,
  gammastep, nwg-drawer, xdg-desktop-portal-gnome; no nwg-dock-hyprland
  as niri doesn't support wlr-foreign-toplevel-management)
- setup/tui-install.sh: niri added to DE selection dialog
- apply-theme.sh: niri/config.kdl added to USER_FILES for colour theming

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 16:38:47 +02:00