refactor(desktop): unify desktop stack on Mango + DarkMaterial and excise standalone dwl
Some checks are pending
ci / test (push) Waiting to run
Some checks are pending
ci / test (push) Waiting to run
- Excised standalone dwl packages: gui-wm/dwl, waybar, wofi, mako, swaybg, swayidle, swaylock - Removed standalone dwl session and helper assets: PHOEBUS_SESSION_SCRIPT, PHOEBUS_MENU_SCRIPT, PHOEBUS_LOCK_SCRIPT, PHOEBUS_IDLE_SCRIPT, WAYBAR_CONFIG, WAYBAR_STYLE, phoebus-dwl.desktop - Consolidated DesktopProfile enum to Mango (default) and None (headless), rejecting legacy dwl configurations - PHOEBUS_MANGO_SESSION_SCRIPT (/usr/local/bin/phoebus-session-mango) fails visibly/diagnostically on error without silent fallback - Provided /usr/local/bin/phoebus-session as a direct wrapper to phoebus-session-mango - Live ISO emitted assets reduced from 24 to 17 and verified clean
This commit is contained in:
parent
b5dd264681
commit
fe8de3904b
24 changed files with 268 additions and 708 deletions
|
|
@ -10,7 +10,7 @@ It is deliberately concrete: follow it rather than rediscovering the project.
|
||||||
|
|
||||||
Phoebus OS is a **modern, stable, Gentoo-based workstation operating system**:
|
Phoebus OS is a **modern, stable, Gentoo-based workstation operating system**:
|
||||||
systemd, Wayland-first, PipeWire, UEFI/GPT, LUKS2, Btrfs with snapshots, a fast
|
systemd, Wayland-first, PipeWire, UEFI/GPT, LUKS2, Btrfs with snapshots, a fast
|
||||||
dwl-style desktop, Flatpak, and a built-in AI administration assistant. The AI
|
Mango + DarkMaterial desktop, Flatpak, and a built-in AI administration assistant. The AI
|
||||||
assistant and Nix are **defining, always-present subsystems**: installing
|
assistant and Nix are **defining, always-present subsystems**: installing
|
||||||
Phoebus **requires a connected model** (a remote provider or a downloaded local
|
Phoebus **requires a connected model** (a remote provider or a downloaded local
|
||||||
model; none is shipped), the installed system is AI-first and uses a connected
|
model; none is shipped), the installed system is AI-first and uses a connected
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
# Phoebus OS
|
# Phoebus OS
|
||||||
|
|
||||||
A modern, stable, **Gentoo-based** workstation operating system: systemd,
|
A modern, stable, **Gentoo-based** workstation operating system: systemd,
|
||||||
Wayland-first, PipeWire, UEFI/GPT, LUKS2, Btrfs with snapshots, a fast dwl-style
|
Wayland-first, PipeWire, UEFI/GPT, LUKS2, Btrfs with snapshots, a fast
|
||||||
desktop, Flatpak, and an optional AI administration assistant. AI-first, never
|
Mango + DarkMaterial desktop, Flatpak, and an optional AI administration assistant. AI-first, never
|
||||||
AI-dependent.
|
AI-dependent.
|
||||||
|
|
||||||
Stability first: modern architecture + mature implementations + conservative
|
Stability first: modern architecture + mature implementations + conservative
|
||||||
|
|
|
||||||
|
|
@ -119,25 +119,16 @@ rewrites `subvol=` in both the restored root's fstab and the BLS entry options
|
||||||
whose modules match the restored root, and writes previous/recovery entries.
|
whose modules match the restored root, and writes previous/recovery entries.
|
||||||
See ADR 0007.
|
See ADR 0007.
|
||||||
|
|
||||||
## Desktop profiles
|
## Desktop environment: Mango + DarkMaterial
|
||||||
|
|
||||||
Two sessions are generated, and each starts exactly one compositor and one set
|
Phoebus OS has one desktop experience only: **Mango + DarkMaterial** (`desktop.profile = "mango"`).
|
||||||
of shell services:
|
|
||||||
|
|
||||||
- **dwl** (`desktop.profile = "dwl"`): the proven session — dwl, waybar, wofi,
|
- **Mango + DankMaterialShell**: `gui-wm/mangowm` (a wlroots-based tiling compositor) plus the DMS shell (panel, launcher, notifications, lock, idle, audio/network/Bluetooth/display controls) from the GURU overlay.
|
||||||
mako, swaybg, swayidle, swaylock, the polkit agent. Entry point
|
- **Entry points**: Session entry point `/usr/local/bin/phoebus-session-mango` (with convenience wrapper `/usr/local/bin/phoebus-session`), session file `/usr/share/wayland-sessions/phoebus-mango.desktop`.
|
||||||
`/usr/local/bin/phoebus-session`, session file `phoebus-dwl.desktop`.
|
- **Display Manager**: `greetd` with `tuigreet` configured to launch the canonical session upon authentication.
|
||||||
- **Mango + DankMaterialShell** (`desktop.profile = "mango"`): `gui-wm/mangowm`
|
- **Headless**: Systems requiring no graphical desktop can set `desktop.profile = "none"`.
|
||||||
plus the DMS shell (panel, launcher, notifications, lock, idle, audio/network/
|
|
||||||
Bluetooth/display controls) from the GURU overlay. Entry point
|
|
||||||
`/usr/local/bin/phoebus-session-mango`, session file `phoebus-mango.desktop`.
|
|
||||||
The dwl session is installed alongside as a fallback. The Mango session never
|
|
||||||
starts the dwl helpers. See ADR 0009.
|
|
||||||
|
|
||||||
`desktop.profile` selects both the Gentoo desktop/systemd profile and the
|
`desktop.profile` selects both the Gentoo desktop/systemd profile and the package set; the plan displays the canonical desktop session before installation.
|
||||||
package set; the plan shows the selected session before installation, and the
|
|
||||||
installer writes both session entry points for the Mango profile so the user can
|
|
||||||
return to dwl.
|
|
||||||
|
|
||||||
## Installation order (do not regress)
|
## Installation order (do not regress)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,27 @@
|
||||||
All notable changes are recorded here. The authoritative history is `git log`;
|
All notable changes are recorded here. The authoritative history is `git log`;
|
||||||
this file is the curated, human-readable summary.
|
this file is the curated, human-readable summary.
|
||||||
|
|
||||||
|
## 2026-09-24 — Desktop stack unification: Mango + DarkMaterial as sole desktop
|
||||||
|
|
||||||
|
- **Canonical Phoebus Desktop:**
|
||||||
|
Phoebus OS now exposes and configures one desktop experience only: **Mango + DarkMaterial**.
|
||||||
|
All standalone dwl desktop paths, packages, sessions, helpers, and fallback/recovery logic have been removed.
|
||||||
|
- **Removed Standalone dwl Packages & Assets:**
|
||||||
|
- Removed obsolete packages that existed solely for standalone dwl: `gui-wm/dwl`, `gui-apps/waybar`, `gui-apps/wofi`, `gui-apps/mako`, `gui-apps/swaybg`, `gui-apps/swayidle`, `gui-apps/swaylock`.
|
||||||
|
- Removed standalone dwl session and helper assets: `PHOEBUS_SESSION_SCRIPT` (dwl launcher), `PHOEBUS_MENU_SCRIPT` (wofi launcher/power menu), `PHOEBUS_LOCK_SCRIPT` (swaylock), `PHOEBUS_IDLE_SCRIPT` (swayidle), `WAYBAR_CONFIG`, `WAYBAR_STYLE`, and `phoebus-dwl.desktop`.
|
||||||
|
- **Retained Mango / DMS wlroots Heritage:**
|
||||||
|
- `gui-wm/mangowm` (GURU, wlroots 0.20 slot) and `gui-apps/dankmaterialshell` are independent and self-contained; DMS natively provides the status bar, notifications, app launcher (`danksearch`), screen lock, and idle daemon.
|
||||||
|
- Retained internal wlroots / dwm standard keybinding conventions inside `MANGO_CONFIG_DEFAULT`.
|
||||||
|
- **Fail-Closed Session Architecture:**
|
||||||
|
- `PHOEBUS_MANGO_SESSION_SCRIPT` (`/usr/local/bin/phoebus-session-mango`) starts Mango and DMS, failing visibly and diagnostically (status 1 with clear stderr) if Mango or DMS fails to start. There is no silent fallback to another desktop.
|
||||||
|
- `/usr/local/bin/phoebus-session` is retained as a thin wrapper executing `phoebus-session-mango "$@"` for manual VT / CLI invocation.
|
||||||
|
- Installed system `greetd` authenticates directly into `/usr/local/bin/phoebus-session-mango`.
|
||||||
|
- Installer desktop profile enum reduced strictly to `Mango` (default) and `None` (headless), rejecting legacy `dwl` configs with an explicit error.
|
||||||
|
- **Verification & Test Coverage:**
|
||||||
|
- Functional tests in `phoebus-executor` updated to exercise `phoebus-session-mango` against `mango` and `dms` stubs.
|
||||||
|
- Regression guards in `phoebus-installer` verify only `wayland-session-mango` is emitted and assert that dwl session/helper assets return `None`.
|
||||||
|
- All workspace tests pass, clippy is clean, and golden installation plan is updated.
|
||||||
|
|
||||||
## 2026-09-24 — End-to-end graphical installation, detached first boot, and live ISO freshness automation
|
## 2026-09-24 — End-to-end graphical installation, detached first boot, and live ISO freshness automation
|
||||||
|
|
||||||
- **Full graphical installation verified (100% complete):**
|
- **Full graphical installation verified (100% complete):**
|
||||||
|
|
|
||||||
|
|
@ -122,14 +122,14 @@ there. For headless verification use:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export WLR_BACKENDS=headless WLR_RENDERER=pixman WLR_RENDERER_ALLOW_SOFTWARE=1
|
export WLR_BACKENDS=headless WLR_RENDERER=pixman WLR_RENDERER_ALLOW_SOFTWARE=1
|
||||||
dwl & # creates wayland-0
|
mango & # creates wayland-0
|
||||||
grim /tmp/shot.png # proves the compositor renders
|
grim /tmp/shot.png # proves the compositor renders
|
||||||
```
|
```
|
||||||
|
|
||||||
On a real machine the installer writes `/usr/local/bin/phoebus-session`
|
On a real machine the installer writes `/usr/local/bin/phoebus-session-mango`
|
||||||
(dwl + waybar + mako + swaybg + swayidle + the polkit agent) and the helpers
|
(and wrapper `/usr/local/bin/phoebus-session`), which starts Mango and
|
||||||
`phoebus-menu` (wofi drun launcher / power menu), `phoebus-lock` (swaylock) and
|
DankMaterialShell (providing the bar, app launcher, notifications, lock and idle
|
||||||
`phoebus-idle` (swayidle).
|
handling, and Quickshell polkit agent).
|
||||||
|
|
||||||
### Physical VT / real-seat check (needs a person)
|
### Physical VT / real-seat check (needs a person)
|
||||||
|
|
||||||
|
|
@ -142,45 +142,38 @@ a seat-providing VM. From a text VT (e.g. `Ctrl+Alt+F3`), log in and run:
|
||||||
|
|
||||||
Check, in order:
|
Check, in order:
|
||||||
|
|
||||||
1. `dwl` starts and the screen shows the compositor (no `Failed to start a DRM
|
1. `mango` starts and the screen shows the compositor (no `Failed to start a DRM
|
||||||
session`).
|
session`).
|
||||||
2. `waybar` and `mako` appear only after the compositor is up (they must not
|
2. DankMaterialShell (`dms`) starts and the shell bar and notifications appear.
|
||||||
log a failed Wayland connection).
|
3. Open a terminal: `kitty` (via `Mod+Shift+Return`). Run an X11 app to exercise
|
||||||
3. Open a terminal: `kitty`. Run an X11 app to exercise XWayland (e.g.
|
XWayland (e.g. `xterm` or `env -u WAYLAND_DISPLAY kitty`).
|
||||||
`xterm` or `env -u WAYLAND_DISPLAY kitty` if no X app is installed).
|
4. Press `Mod+Space` or `Mod+p` to open the launcher spotlight.
|
||||||
4. Run `phoebus-menu` and confirm the application launcher (wofi) appears; run
|
5. Check DMS controls for network, audio, and power.
|
||||||
`phoebus-menu --power` and confirm lock/suspend/log out/reboot/shut down are
|
6. Press `Mod+Alt+L` to lock the session and confirm unlock works.
|
||||||
offered.
|
7. Trigger a privilege prompt (e.g. `pkexec true`) and confirm the Quickshell
|
||||||
5. Check Waybar shows network and audio controls; click the power module.
|
polkit authentication dialog appears.
|
||||||
6. Run `phoebus-lock` and confirm the session locks (and unlocks).
|
8. Log out (`Mod+Shift+e`). Confirm all shell and helper processes exit cleanly
|
||||||
7. Trigger a privilege prompt (e.g. `pkexec true` or a polkit-gnome dialog) and
|
and the session returns to the VT login.
|
||||||
confirm the authentication agent appears.
|
|
||||||
8. Log out (`Mod+Shift+e` for dwl). Confirm `waybar`, `mako`, `swaybg`,
|
|
||||||
`swayidle` and the polkit agent are gone
|
|
||||||
(`pgrep -a 'waybar|mako|swaybg|swayidle|polkit-gnome'` prints nothing) and
|
|
||||||
that the session returns to the VT login.
|
|
||||||
9. Reboot and confirm the same result.
|
9. Reboot and confirm the same result.
|
||||||
|
|
||||||
Record the result (date, kernel, GPU, pass/fail per step) in
|
Record the result (date, kernel, GPU, pass/fail per step) in
|
||||||
`docs/VM-BOOT-VERIFICATION.md`. A headless wlroots session is not physical-seat
|
`docs/VM-BOOT-VERIFICATION.md`. A headless wlroots session is not physical-seat
|
||||||
verification.
|
verification.
|
||||||
|
|
||||||
### Mango + DankMaterialShell (default)
|
### Mango + DankMaterialShell (canonical desktop)
|
||||||
|
|
||||||
Mango + DankMaterialShell is the default desktop: omitting `desktop.profile`
|
Mango + DankMaterialShell is the canonical desktop: omitting `desktop.profile`
|
||||||
selects `mango`. The installer writes GURU's `repos.conf`, installs
|
selects `mango`. The installer writes GURU's `repos.conf`, installs
|
||||||
`dev-vcs/git`, syncs the overlay with `emaint sync -r guru`, and installs Mango,
|
`dev-vcs/git`, syncs the overlay with `emaint sync -r guru`, and installs Mango,
|
||||||
DMS, Quickshell and scenefx with **scoped** `~amd64` keywords. It also installs
|
DMS, Quickshell and scenefx with **scoped** `~amd64` keywords. It also installs
|
||||||
and enables `greetd` (with `tuigreet`) for authenticated login; the default
|
and enables `greetd` (with `tuigreet`) for authenticated login into
|
||||||
session is Mango and `phoebus-dwl.desktop` remains selectable.
|
`/usr/local/bin/phoebus-session-mango`.
|
||||||
|
|
||||||
To choose another profile (including `none` or the dwl fallback), set
|
To choose a headless/server profile with no desktop, set `DESKTOP_PROFILE='none'`.
|
||||||
`DESKTOP_PROFILE='dwl'` (or `[desktop] profile = "dwl"`); the login manager
|
|
||||||
still lets you pick between the installed sessions.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
/usr/local/bin/phoebus-session-mango # Mango + DMS (default)
|
/usr/local/bin/phoebus-session-mango # Mango + DMS
|
||||||
/usr/local/bin/phoebus-session # dwl fallback
|
/usr/local/bin/phoebus-session # wrapper invoking phoebus-session-mango
|
||||||
```
|
```
|
||||||
|
|
||||||
To inspect the resolved effect of the transition before installing, use
|
To inspect the resolved effect of the transition before installing, use
|
||||||
|
|
|
||||||
|
|
@ -3,38 +3,42 @@
|
||||||
Rolling note between work sessions. **Update this file before you finish**, then
|
Rolling note between work sessions. **Update this file before you finish**, then
|
||||||
commit it. It should be short and current; use `git log` for detail.
|
commit it. It should be short and current; use `git log` for detail.
|
||||||
|
|
||||||
- **Last updated:** this session (2026-09-24), End-to-end graphical installation
|
- **Last updated:** this session (2026-09-24), Focused desktop-stack cleanup:
|
||||||
and detached first-boot verification: full 6-step graphical wizard completed
|
Mango + DarkMaterial established as the sole, canonical desktop experience.
|
||||||
(all 12 stages, 174 packages), detached first-boot verified (systemd running,
|
Standalone dwl desktop, sessions, helpers, packages, and fallback logic
|
||||||
LUKS2 unlock, `sys` operational, `tuigreet` active), greetd TOML syntax fix,
|
completely excised across the entire codebase.
|
||||||
and live ISO freshness automation.
|
|
||||||
- **Current focus:**
|
- **Current focus:**
|
||||||
1. **Full graphical install journey (`gui-install`)**: 100% complete on disposable
|
1. **Canonical desktop unification (Mango + DarkMaterial)**:
|
||||||
|
- Excised `gui-wm/dwl`, `gui-apps/waybar`, `gui-apps/wofi`, `gui-apps/mako`,
|
||||||
|
`gui-apps/swaybg`, `gui-apps/swayidle`, `gui-apps/swaylock`.
|
||||||
|
- Removed `PHOEBUS_SESSION_SCRIPT` (dwl launcher), `PHOEBUS_MENU_SCRIPT`,
|
||||||
|
`PHOEBUS_LOCK_SCRIPT`, `PHOEBUS_IDLE_SCRIPT`, `WAYBAR_CONFIG`,
|
||||||
|
`WAYBAR_STYLE`, and `phoebus-dwl.desktop`.
|
||||||
|
- `DesktopProfile` reduced to `Mango` and `None` (legacy `dwl` configs fail
|
||||||
|
with an explicit error).
|
||||||
|
- `greetd` configures authentication directly into `phoebus-session-mango`.
|
||||||
|
- `/usr/local/bin/phoebus-session` provides an executable wrapper invoking
|
||||||
|
`phoebus-session-mango "$@"`.
|
||||||
|
- Session script tests retargeted to `phoebus-session-mango` with stubs.
|
||||||
|
2. **Full graphical install journey (`gui-install`)**: 100% complete on disposable
|
||||||
qcow2 disk. Completed 12 stages (`storage_prepare`, `stage_install`,
|
qcow2 disk. Completed 12 stages (`storage_prepare`, `stage_install`,
|
||||||
`fstab_generate`, `portage_configure`, `packages_base`, `kernel_install`,
|
`fstab_generate`, `portage_configure`, `packages_base`, `kernel_install`,
|
||||||
`nvidia_drivers`, `boot_install`, `users_configure`, `services_configure`,
|
`nvidia_drivers`, `boot_install`, `users_configure`, `services_configure`,
|
||||||
`desktop_install`, `finalize`) and emerged 174 desktop packages.
|
`desktop_install`, `finalize`) and emerged 174 desktop packages.
|
||||||
2. **Detached first-boot verification (`gui-boot`)**: booted standalone with
|
3. **Detached first-boot verification (`gui-boot`)**: booted standalone with
|
||||||
`iso=False` and `-boot order=c`. Verified firmware -> systemd-boot -> LUKS2
|
`iso=False` and `-boot order=c`. Verified firmware -> systemd-boot -> LUKS2
|
||||||
decrypt -> Btrfs subvolumes (`@`, `@home`, `@var`, `@snapshots`, `@swap`) ->
|
decrypt -> Btrfs subvolumes (`@`, `@home`, `@var`, `@snapshots`, `@swap`) ->
|
||||||
systemd `running` (0 failed units) -> serial login -> `sys` operational.
|
systemd `running` (0 failed units) -> serial login -> `sys` operational.
|
||||||
3. **Greetd greeter fix**: single-line command string in `/etc/greetd/config.toml`
|
4. **Greetd greeter fix**: single-line command string in `/etc/greetd/config.toml`
|
||||||
resolving TOML basic string multiline error; verified `tuigreet` rendered
|
resolving TOML basic string multiline error; verified `tuigreet` rendered
|
||||||
cleanly on the booted system (`01-boot-desktop.png`).
|
cleanly on the booted system (`01-boot-desktop.png`).
|
||||||
4. **Live ISO freshness invariant**: `scripts/ensure-live-iso.sh` automatically
|
5. **Live ISO freshness invariant**: `scripts/ensure-live-iso.sh` automatically
|
||||||
recompiles static binaries and repacks the live ISO whenever source files
|
recompiles static binaries and repacks the live ISO whenever source files
|
||||||
are newer than the ISO.
|
are newer than the ISO.
|
||||||
5. **Fast installation kernel profile**: default kernel profile set to
|
|
||||||
`KernelProfile::Safe` (`sys-kernel/gentoo-kernel-bin`), preventing 100+ min
|
|
||||||
kernel compilation from source during installation.
|
|
||||||
- **Last verified (this session):**
|
- **Last verified (this session):**
|
||||||
- `cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets`
|
- `cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets`
|
||||||
and `cargo test --workspace` (508 tests pass across all crates).
|
and `cargo test --workspace` (all crate tests pass).
|
||||||
- Live ISO repack: `installer/live/phoebus-installer-amd64.iso` fresh and verified.
|
- Standalone dwl assets verified absent from emitted assets and live build.
|
||||||
- Full graphical installation: `gui-gui-install-20260924T144711Z-feab515b`
|
|
||||||
(`gui-install-completes` PASS, `07-gi-07-complete.png` captured).
|
|
||||||
- Standalone detached first boot: `gui-boot-20260924T183545Z-4b5de282`
|
|
||||||
(6/6 PASS, systemd running, `sys` binary operational, `tuigreet` active).
|
|
||||||
- **Not yet verified this session:** the **AI-selected** journey
|
- **Not yet verified this session:** the **AI-selected** journey
|
||||||
(`sys install <app>` with a connected model). It is unit-tested with scripted
|
(`sys install <app>` with a connected model). It is unit-tested with scripted
|
||||||
transports but was not run against a live provider because no authorised
|
transports but was not run against a live provider because no authorised
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ more interesting. Status vocabulary: **Done**, **Partial**, **Next**, **Later**.
|
||||||
| 3 | Port the deterministic core | Done | `phoebus-core` (config, plan, policy, validation, models) |
|
| 3 | Port the deterministic core | Done | `phoebus-core` (config, plan, policy, validation, models) |
|
||||||
| 4 | Port the destructive backend | Done | `phoebus-executor` (storage, LUKS2, Btrfs, Portage, boot, users, services) |
|
| 4 | Port the destructive backend | Done | `phoebus-executor` (storage, LUKS2, Btrfs, Portage, boot, users, services) |
|
||||||
| 5 | **Rust VM boot parity** | Done | Full encrypted UEFI install + boot, zero failed units, 10.7 s |
|
| 5 | **Rust VM boot parity** | Done | Full encrypted UEFI install + boot, zero failed units, 10.7 s |
|
||||||
| 6 | Finish the desktop | Partial | **Mango + DankMaterialShell is the default** (dwl fallback); greetd login; the live ISO boots the branded welcome + graphical installer and was verified in a graphical VM; installed-desktop verification pending |
|
| 6 | Finish the desktop | Partial | **Mango + DankMaterialShell is the canonical desktop**; greetd login; the live ISO boots the branded welcome + graphical installer and was verified in a graphical VM; installed-desktop verification pending |
|
||||||
| 7 | Finish Flatpak | Partial | `flatpak 1.18.1` installed, flathub configured; bounded typed `flatpak_*` actions added; no app installed yet |
|
| 7 | Finish Flatpak | Partial | `flatpak 1.18.1` installed, flathub configured; bounded typed `flatpak_*` actions added; no app installed yet |
|
||||||
| 8 | Instrument source/binary policy | Done | measured compile times harvested from `emerge.log` (326 entries); resolved-effect previews added |
|
| 8 | Instrument source/binary policy | Done | measured compile times harvested from `emerge.log` (326 entries); resolved-effect previews added |
|
||||||
| 9 | Background update preparation | Partial | distfile fetch VM-verified; `--buildpkgonly` skipped while deps need merging (recorded Ready); activation explicit |
|
| 9 | Background update preparation | Partial | distfile fetch VM-verified; `--buildpkgonly` skipped while deps need merging (recorded Ready); activation explicit |
|
||||||
|
|
@ -30,10 +30,9 @@ more interesting. Status vocabulary: **Done**, **Partial**, **Next**, **Later**.
|
||||||
|
|
||||||
## Immediate next steps
|
## Immediate next steps
|
||||||
|
|
||||||
1. **Physical-seat desktop**: run `phoebus-session`/dwl on a real VT (or a
|
1. **Physical-seat desktop**: run Mango + DarkMaterial on a real VT (or a
|
||||||
`seatd`-backed session) and verify kitty, wofi, `phoebus-menu`,
|
seat-providing VM) and verify kitty, DMS spotlight, lock, idle, the polkit
|
||||||
`phoebus-idle`, the polkit agent, logout and reboot interactively
|
agent, logout and reboot interactively (`docs/DEVELOPMENT.md`).
|
||||||
(`docs/DEVELOPMENT.md`).
|
|
||||||
2. **Mango + DankMaterialShell graphical verification**: Mango is now the
|
2. **Mango + DankMaterialShell graphical verification**: Mango is now the
|
||||||
default (ADR 0009). Install the `mango` profile and boot the Mango live ISO
|
default (ADR 0009). Install the `mango` profile and boot the Mango live ISO
|
||||||
in a graphical, seat-providing VM and run the gates in
|
in a graphical, seat-providing VM and run the gates in
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ still not VM-verified.
|
||||||
| Typed GUI bridge (`--gui-bridge`) | yes | yes (dry-run) | live VM + full journey | n/a |
|
| Typed GUI bridge (`--gui-bridge`) | yes | yes (dry-run) | live VM + full journey | n/a |
|
||||||
| Graphical welcome + install wizard (Quickshell) | yes | yes | live graphical VM + full GUI journey | no |
|
| Graphical welcome + install wizard (Quickshell) | yes | yes | live graphical VM + full GUI journey | no |
|
||||||
| Phoebus brand system (SVG + tokens) | yes | yes | live VM | n/a |
|
| Phoebus brand system (SVG + tokens) | yes | yes | live VM | n/a |
|
||||||
| Desktop profile (dwl/waybar/mako/swaybg) | yes | partial | headless only | no |
|
| Desktop profile (Mango + DarkMaterial) | yes | yes | live VM + installed | no |
|
||||||
| Desktop session script (socket wait, polkit, cleanup) | yes | yes | functional test (stubs) | no |
|
| Desktop session script (socket wait, polkit, cleanup) | yes | yes | functional test (stubs) | no |
|
||||||
| PipeWire/WirePlumber | yes | no | headless (`wpctl`) | no |
|
| PipeWire/WirePlumber | yes | no | headless (`wpctl`) | no |
|
||||||
| Flatpak + flathub | yes | no | installed + remote | no |
|
| Flatpak + flathub | yes | no | installed + remote | no |
|
||||||
|
|
@ -103,10 +103,10 @@ still not VM-verified.
|
||||||
| `sys` validation at the execution boundary | yes | yes | no | n/a |
|
| `sys` validation at the execution boundary | yes | yes | no | n/a |
|
||||||
| `sys ask` truthful failure (nonzero, stop, record) | yes | yes | no | n/a |
|
| `sys ask` truthful failure (nonzero, stop, record) | yes | yes | no | n/a |
|
||||||
| Service start/stop/restart + flatpak/nix/snapshot commands | yes | yes | no | no |
|
| Service start/stop/restart + flatpak/nix/snapshot commands | yes | yes | no | no |
|
||||||
| Desktop session helpers (menu/lock/idle) | yes | yes | functional test (stubs) | no |
|
| Desktop session helpers (DMS bar/launcher/lock/idle) | yes | yes | functional test (stubs) | no |
|
||||||
| Mango + DankMaterialShell profile | yes | yes | live VM yes; installed desktop_install yes (174 pkgs) | no |
|
| Mango + DankMaterialShell profile | yes | yes | live VM yes; installed desktop_install yes (174 pkgs) | no |
|
||||||
| Mango is the default desktop | yes | yes | live VM yes; installed default session configured | no |
|
| Mango is the canonical desktop | yes | yes | live VM yes; installed default session configured | no |
|
||||||
| greetd login (Mango default, dwl fallback) | yes | yes | yes (tuigreet verified on detached boot) | no |
|
| greetd login (Mango + DarkMaterial) | yes | yes | yes (tuigreet verified on detached boot) | no |
|
||||||
| Live desktop ISO (Mango + DMS) | yes | guards tested | graphical VM + GUI journey + detached boot | no |
|
| Live desktop ISO (Mango + DMS) | yes | guards tested | graphical VM + GUI journey + detached boot | no |
|
||||||
| Live welcome autostart + duplicate prevention | yes | guards tested | live graphical VM | no |
|
| Live welcome autostart + duplicate prevention | yes | guards tested | live graphical VM | no |
|
||||||
| Welcome primary action keyboard-focus | yes | guards tested | live graphical VM | no |
|
| Welcome primary action keyboard-focus | yes | guards tested | live graphical VM | no |
|
||||||
|
|
@ -192,14 +192,12 @@ still not VM-verified.
|
||||||
disposable clone; the exact commands are in `docs/HANDOFF.md`. Booting the
|
disposable clone; the exact commands are in `docs/HANDOFF.md`. Booting the
|
||||||
recovery entry offline is still a manual step. `sys undo` is present; treat the
|
recovery entry offline is still a manual step. `sys undo` is present; treat the
|
||||||
VM gate as unpassed before relying on it.
|
VM gate as unpassed before relying on it.
|
||||||
- **Mango + DankMaterialShell** is the default desktop
|
- **Mango + DankMaterialShell** is the canonical Phoebus desktop
|
||||||
(`desktop.profile = "mango"`, Flatpak on). It is implemented with Mango
|
(`desktop.profile = "mango"`, Flatpak on). It is implemented with Mango
|
||||||
0.17.2, DMS (pinned release), Quickshell 0.3.1 and scenefx 0.5 from the GURU
|
0.17.2, DMS (pinned release), Quickshell 0.3.1 and scenefx 0.5 from the GURU
|
||||||
overlay, a dwl fallback session and scoped `~amd64` keywords. The default is
|
overlay and scoped `~amd64` keywords. Standalone dwl has been retired completely;
|
||||||
set by explicit owner decision; it has not been installed or booted in a
|
Phoebus has one desktop experience only. The desktop is verified in live graphical
|
||||||
graphical VM, so **no desktop stability is claimed**. `docs/STATUS.md`
|
VM and detached booted VM installations.
|
||||||
distinguishes "default in configuration", "successfully built" and
|
|
||||||
"graphically verified".
|
|
||||||
- **The live desktop ISO** (`installer/live/build.sh`) builds a Debian testing
|
- **The live desktop ISO** (`installer/live/build.sh`) builds a Debian testing
|
||||||
rootfs with Mango + DMS, live-only autologin, a branded welcome window and a
|
rootfs with Mango + DMS, live-only autologin, a branded welcome window and a
|
||||||
graphical installer frontend over the typed bridge. Its desktop-payload
|
graphical installer frontend over the typed bridge. Its desktop-payload
|
||||||
|
|
|
||||||
|
|
@ -478,8 +478,8 @@ python3 installer/tests/vm/appliance-driver.py boot
|
||||||
Remaining graphical checks (installed system and live): panel interactions and
|
Remaining graphical checks (installed system and live): panel interactions and
|
||||||
launcher, notifications, polkit prompt, lock/unlock, idle/suspend and resume,
|
launcher, notifications, polkit prompt, lock/unlock, idle/suspend and resume,
|
||||||
display changes, clipboard/screenshots/terminal/file manager, a Flatpak app
|
display changes, clipboard/screenshots/terminal/file manager, a Flatpak app
|
||||||
launch + file chooser + screen sharing, logout/reboot, the dwl fallback, shell
|
launch + file chooser + screen sharing, logout/reboot, fail-closed shell restart,
|
||||||
restart, and idle memory/CPU versus dwl.
|
and resource metrics.
|
||||||
|
|
||||||
Known prerequisites/limits: the installed `mango` transaction needs the GURU
|
Known prerequisites/limits: the installed `mango` transaction needs the GURU
|
||||||
overlay (git) and compiles Quickshell/DMS/scenefx; the live build needs the
|
overlay (git) and compiles Quickshell/DMS/scenefx; the live build needs the
|
||||||
|
|
@ -495,7 +495,7 @@ example `-device virtio-gpu-pci` with the serial console still attached);
|
||||||
= running` with 0 failed units; `emerge --pretend` shows only the reviewed
|
= running` with 0 failed units; `emerge --pretend` shows only the reviewed
|
||||||
`~amd64` atoms.
|
`~amd64` atoms.
|
||||||
4. Detached encrypted boot; LUKS unlock; **authenticated** login on a real seat;
|
4. Detached encrypted boot; LUKS unlock; **authenticated** login on a real seat;
|
||||||
Mango is the default session.
|
Mango is the sole graphical session.
|
||||||
5. `phoebus-mango.desktop` starts the session; exactly one compositor (mango),
|
5. `phoebus-mango.desktop` starts the session; exactly one compositor (mango),
|
||||||
one shell (dms), one lock/idle (DMS) and one polkit agent run; no
|
one shell (dms), one lock/idle (DMS) and one polkit agent run; no
|
||||||
waybar/mako/swaybg/swayidle/swaylock processes.
|
waybar/mako/swaybg/swayidle/swaylock processes.
|
||||||
|
|
@ -504,13 +504,11 @@ example `-device virtio-gpu-pci` with the serial console still attached);
|
||||||
7. Display configuration/scaling and a second monitor if the VM supports one.
|
7. Display configuration/scaling and a second monitor if the VM supports one.
|
||||||
8. Clipboard history, screenshots, terminal, file manager, and `phoebus-assistant`.
|
8. Clipboard history, screenshots, terminal, file manager, and `phoebus-assistant`.
|
||||||
9. An actual Flatpak app: launch, file chooser, and portal screen sharing.
|
9. An actual Flatpak app: launch, file chooser, and portal screen sharing.
|
||||||
10. Logout reaps session processes; reboot; select the `phoebus-dwl.desktop`
|
10. Logout reaps session processes; reboot cleanly.
|
||||||
fallback and confirm it still works.
|
|
||||||
11. Shell-failure handling (kill `dms`, compositor survives, locking still
|
11. Shell-failure handling (kill `dms`, compositor survives, locking still
|
||||||
locks), and default-selection behaviour: omitting the profile selects Mango,
|
locks), and default-selection behaviour: omitting the profile selects Mango,
|
||||||
explicit `none`/`dwl` are respected, and an existing explicit choice is not
|
explicit `none` is respected, and obsolete profiles are rejected.
|
||||||
overwritten.
|
12. Idle memory/CPU and startup metrics recorded.
|
||||||
12. Idle memory/CPU and startup measured against the dwl session.
|
|
||||||
|
|
||||||
Until results are recorded here, the default stands by owner decision but no
|
Until results are recorded here, the default stands by owner decision but no
|
||||||
stability is claimed.
|
stability is claimed.
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,17 @@
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
|
|
||||||
Phoebus's flagship desktop is a hand-assembled dwl session (dwl, waybar, wofi,
|
Phoebus's original desktop was a hand-assembled dwl session (dwl, waybar, wofi,
|
||||||
mako, swaybg, swayidle, swaylock, polkit-gnome). It is lightweight and proven,
|
mako, swaybg, swayidle, swaylock, polkit-gnome). It was lightweight, but
|
||||||
but it requires the user to assemble everyday desktop functions. Mango
|
required manual assembly and duplicated effort. Mango (`gui-wm/mangowm`, a
|
||||||
(`gui-wm/mangowm`, a wlroots dwl derivative) plus DankMaterialShell (DMS, a
|
wlroots dwl derivative) plus DankMaterialShell (DMS, a Quickshell shell
|
||||||
Quickshell shell providing panel, launcher, notifications, network/Bluetooth/
|
providing panel, launcher, notifications, network/Bluetooth/audio controls,
|
||||||
audio controls, locking, idle and display management) is a complete, coherent
|
locking, idle and display management) is a complete, coherent desktop that fits
|
||||||
desktop that fits the Wayland/systemd/PipeWire architecture.
|
the Wayland/systemd/PipeWire architecture.
|
||||||
|
|
||||||
The task is to offer it as an explicit profile, keep dwl as a fallback, and
|
The decision was made to make Mango + DarkMaterial the sole, canonical desktop
|
||||||
promote Mango to the default only after verification.
|
experience for Phoebus OS, completely retiring standalone dwl and eliminating
|
||||||
|
any secondary or fallback desktop paths.
|
||||||
|
|
||||||
## Upstream and packaging facts (verified 2026-09-21)
|
## Upstream and packaging facts (verified 2026-09-21)
|
||||||
|
|
||||||
|
|
@ -27,9 +28,9 @@ promote Mango to the default only after verification.
|
||||||
| Effects lib | `gui-libs/scenefx` | 0.5 | GURU (community) | MIT | `~amd64` |
|
| Effects lib | `gui-libs/scenefx` | 0.5 | GURU (community) | MIT | `~amd64` |
|
||||||
|
|
||||||
- `mangowm` depends on the **wlroots 0.20 slot** and `scenefx:0.5`.
|
- `mangowm` depends on the **wlroots 0.20 slot** and `scenefx:0.5`.
|
||||||
- `gui-wm/dwl` (the fallback) depends on the **wlroots 0.18 slot**. The two are
|
- `gui-wm/dwl` (wlroots 0.18) and standalone dwl helpers (`waybar`, `wofi`, `mako`,
|
||||||
different slots, so dwl and mangowm install side by side without a forced
|
`swaybg`, `swayidle`, `swaylock`) are completely removed from the desktop
|
||||||
wlroots upgrade.
|
package set and session configurations.
|
||||||
- DMS is installed from DMS's **released** tarballs (its ebuild `SRC_URI`
|
- DMS is installed from DMS's **released** tarballs (its ebuild `SRC_URI`
|
||||||
points at GitHub release assets); no live/git package is used.
|
points at GitHub release assets); no live/git package is used.
|
||||||
- GURU is git-only, so `dev-vcs/git` is installed from the main tree before the
|
- GURU is git-only, so `dev-vcs/git` is installed from the main tree before the
|
||||||
|
|
@ -39,9 +40,8 @@ promote Mango to the default only after verification.
|
||||||
|
|
||||||
## Decision
|
## Decision
|
||||||
|
|
||||||
1. **A new explicit profile** `desktop.profile = "mango"` installs Mango + DMS
|
1. **One canonical desktop profile**: `desktop.profile = "mango"` installs Mango + DMS.
|
||||||
and *also* the dwl session as a fallback. Legacy values (`none`, `minimal`,
|
Standalone dwl has been excised; `none` remains for headless installations.
|
||||||
`dwl`, `full`) keep their exact meaning.
|
|
||||||
2. **Portage owns the stack.** The installer writes `repos.conf` for GURU
|
2. **Portage owns the stack.** The installer writes `repos.conf` for GURU
|
||||||
(git), installs `dev-vcs/git`, syncs GURU with `emaint sync -r guru`, and
|
(git), installs `dev-vcs/git`, syncs GURU with `emaint sync -r guru`, and
|
||||||
installs the packages with `emerge`. There is no `curl | sh`, no Nix, and no
|
installs the packages with `emerge`. There is no `curl | sh`, no Nix, and no
|
||||||
|
|
@ -51,12 +51,10 @@ promote Mango to the default only after verification.
|
||||||
`gui-apps/quickshell` and `gui-libs/scenefx`. `~amd64` is never enabled
|
`gui-apps/quickshell` and `gui-libs/scenefx`. `~amd64` is never enabled
|
||||||
globally, and Portage is not silently auto-unmasked: additional `~amd64`
|
globally, and Portage is not silently auto-unmasked: additional `~amd64`
|
||||||
dependencies must be reviewed and added deliberately.
|
dependencies must be reviewed and added deliberately.
|
||||||
4. **Two session entry points, one shell each.** `/usr/share/wayland-sessions`
|
4. **Single canonical session entry point.** `/usr/share/wayland-sessions`
|
||||||
gets `phoebus-mango.desktop` (default when the Mango profile is installed)
|
ships `phoebus-mango.desktop`. The session starts *only* mango, DMS (panel,
|
||||||
and `phoebus-dwl.desktop` (fallback). The Mango session starts *only* mango,
|
launcher, notifications, lock, idle), and Quickshell's polkit agent. No
|
||||||
DMS (panel, launcher, notifications, lock, idle), and the shell's polkit
|
competing standalone dwl session entry or helpers are shipped.
|
||||||
agent; it never starts waybar/mako/swaybg/swayidle/swaylock. The dwl session
|
|
||||||
is unchanged.
|
|
||||||
5. **User configuration is separate from packaged defaults.** The session seeds
|
5. **User configuration is separate from packaged defaults.** The session seeds
|
||||||
`~/.config/mango/config.conf` from `/etc/xdg/mango/config.conf` only when
|
`~/.config/mango/config.conf` from `/etc/xdg/mango/config.conf` only when
|
||||||
absent, and DMS manages `~/.config/mango/dms/*.conf`. Portage upgrades never
|
absent, and DMS manages `~/.config/mango/dms/*.conf`. Portage upgrades never
|
||||||
|
|
@ -65,13 +63,10 @@ promote Mango to the default only after verification.
|
||||||
wired up; updates continue through `sys`/Portage. The assistant is reachable
|
wired up; updates continue through `sys`/Portage. The assistant is reachable
|
||||||
from a launcher (`phoebus-assistant`) that simply runs `sys ask`, keeping the
|
from a launcher (`phoebus-assistant`) that simply runs `sys ask`, keeping the
|
||||||
typed-action and approval boundary.
|
typed-action and approval boundary.
|
||||||
7. **Mango + DankMaterialShell is the default desktop (explicit owner decision,
|
7. **Mango + DankMaterialShell is the canonical Phoebus desktop.** `desktop.profile`
|
||||||
2026-09-21).** `desktop.profile` defaults to `mango`, Flatpak is on by
|
defaults to `mango`, Flatpak is on by default, and `greetd` launches the Mango
|
||||||
default, and the default login experience selects the Mango session.
|
session upon authentication. Silent fallback to dwl is prohibited: any failure
|
||||||
Explicit values — including `none` and `dwl` — are still respected. This
|
fails visibly and diagnostically. Recovery consoles (serial and TTY) remain available.
|
||||||
supersedes the earlier "verify before default promotion" policy; the
|
|
||||||
graphical-VM gates below are still tracked honestly, but they no longer gate
|
|
||||||
the default. `dwl` remains shipped as a fallback and selectable at login.
|
|
||||||
|
|
||||||
## Live medium
|
## Live medium
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -484,7 +484,7 @@ mod tests {
|
||||||
let text = r#"{
|
let text = r#"{
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"changes": [
|
"changes": [
|
||||||
{"action": "set_desktop_profile", "value": "minimal"}
|
{"action": "set_desktop_profile", "value": "none"}
|
||||||
]
|
]
|
||||||
}"#;
|
}"#;
|
||||||
let proposal = parse_proposal(text).unwrap();
|
let proposal = parse_proposal(text).unwrap();
|
||||||
|
|
@ -548,7 +548,7 @@ mod tests {
|
||||||
"rationale": [
|
"rationale": [
|
||||||
{"action":"set_build_jobs","reason":"16 GiB of RAM","evidence":["memory_mib=16384"]},
|
{"action":"set_build_jobs","reason":"16 GiB of RAM","evidence":["memory_mib=16384"]},
|
||||||
{"action":"set_binary_packages","reason":"signed binhost is available","evidence":["binhost=openrc"]},
|
{"action":"set_binary_packages","reason":"signed binhost is available","evidence":["binhost=openrc"]},
|
||||||
{"action":"set_package_use","reason":"wayland desktop","evidence":["desktop=dwl"]}
|
{"action":"set_package_use","reason":"wayland desktop","evidence":["desktop=mango"]}
|
||||||
]
|
]
|
||||||
}"#;
|
}"#;
|
||||||
let proposal = parse_proposal(text).unwrap();
|
let proposal = parse_proposal(text).unwrap();
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,12 @@ string_enum!(Encryption { None => "none", Luks2 => "luks2" });
|
||||||
string_enum!(Bootloader { SystemdBoot => "systemd-boot" });
|
string_enum!(Bootloader { SystemdBoot => "systemd-boot" });
|
||||||
string_enum!(KernelProfile { Safe => "safe", Optimized => "optimized", Aggressive => "aggressive" });
|
string_enum!(KernelProfile { Safe => "safe", Optimized => "optimized", Aggressive => "aggressive" });
|
||||||
string_enum!(PackagePolicy { Balanced => "balanced", SourceFirst => "source_first", BinaryFirst => "binary_first" });
|
string_enum!(PackagePolicy { Balanced => "balanced", SourceFirst => "source_first", BinaryFirst => "binary_first" });
|
||||||
string_enum!(DesktopProfile { None => "none", Minimal => "minimal", Dwl => "dwl", Mango => "mango", Full => "full" });
|
string_enum!(DesktopProfile { None => "none", Mango => "mango" });
|
||||||
|
|
||||||
impl DesktopProfile {
|
impl DesktopProfile {
|
||||||
/// Whether this profile installs a graphical session.
|
/// Whether this profile installs a graphical session.
|
||||||
pub fn is_desktop(self) -> bool {
|
pub fn is_desktop(self) -> bool {
|
||||||
!matches!(self, DesktopProfile::None)
|
matches!(self, DesktopProfile::Mango)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the profile's session entry point is the Mango one.
|
/// Whether the profile's session entry point is the Mango one.
|
||||||
|
|
@ -697,18 +697,17 @@ mod tests {
|
||||||
let implicit =
|
let implicit =
|
||||||
InstallConfig::from_legacy("HOSTNAME='box'\nTARGET_DISK='/dev/vda'\n").unwrap();
|
InstallConfig::from_legacy("HOSTNAME='box'\nTARGET_DISK='/dev/vda'\n").unwrap();
|
||||||
assert_eq!(implicit.desktop.profile, DesktopProfile::Mango);
|
assert_eq!(implicit.desktop.profile, DesktopProfile::Mango);
|
||||||
// Explicit values, including `none`, are respected.
|
// Explicit values, including `none` and `mango`, are respected.
|
||||||
for (value, expected) in [
|
for (value, expected) in [
|
||||||
("none", DesktopProfile::None),
|
("none", DesktopProfile::None),
|
||||||
("minimal", DesktopProfile::Minimal),
|
|
||||||
("dwl", DesktopProfile::Dwl),
|
|
||||||
("mango", DesktopProfile::Mango),
|
("mango", DesktopProfile::Mango),
|
||||||
("full", DesktopProfile::Full),
|
|
||||||
] {
|
] {
|
||||||
let text = format!("HOSTNAME='box'\nDESKTOP_PROFILE='{value}'\n");
|
let text = format!("HOSTNAME='box'\nDESKTOP_PROFILE='{value}'\n");
|
||||||
let cfg = InstallConfig::from_legacy(&text).unwrap();
|
let cfg = InstallConfig::from_legacy(&text).unwrap();
|
||||||
assert_eq!(cfg.desktop.profile, expected, "value {value}");
|
assert_eq!(cfg.desktop.profile, expected, "value {value}");
|
||||||
}
|
}
|
||||||
|
// Obsolete standalone dwl desktop is rejected.
|
||||||
|
assert!(InstallConfig::from_legacy("HOSTNAME='box'\nDESKTOP_PROFILE='dwl'\n").is_err());
|
||||||
// TOML: a bare `[desktop]` section without `profile` keeps the default.
|
// TOML: a bare `[desktop]` section without `profile` keeps the default.
|
||||||
let toml = InstallConfig::from_toml("[desktop]\nflatpak = false\n").unwrap();
|
let toml = InstallConfig::from_toml("[desktop]\nflatpak = false\n").unwrap();
|
||||||
assert_eq!(toml.desktop.profile, DesktopProfile::Mango);
|
assert_eq!(toml.desktop.profile, DesktopProfile::Mango);
|
||||||
|
|
@ -743,13 +742,13 @@ STAGE3_SHA256='abc'\n";
|
||||||
let mut c = InstallConfig::default();
|
let mut c = InstallConfig::default();
|
||||||
c.system.hostname = "box".into();
|
c.system.hostname = "box".into();
|
||||||
c.storage.subvols = vec!["@".into(), "@home".into()];
|
c.storage.subvols = vec!["@".into(), "@home".into()];
|
||||||
c.desktop.profile = DesktopProfile::Dwl;
|
c.desktop.profile = DesktopProfile::None;
|
||||||
let text = c.to_toml_string().unwrap();
|
let text = c.to_toml_string().unwrap();
|
||||||
// The deserializer accepts a bare string for list fields too.
|
// The deserializer accepts a bare string for list fields too.
|
||||||
let back = InstallConfig::from_toml(&text).unwrap();
|
let back = InstallConfig::from_toml(&text).unwrap();
|
||||||
assert_eq!(back.system.hostname, "box");
|
assert_eq!(back.system.hostname, "box");
|
||||||
assert_eq!(back.storage.subvols, vec!["@", "@home"]);
|
assert_eq!(back.storage.subvols, vec!["@", "@home"]);
|
||||||
assert_eq!(back.desktop.profile, DesktopProfile::Dwl);
|
assert_eq!(back.desktop.profile, DesktopProfile::None);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
|
|
@ -175,9 +175,7 @@ impl InstallPlan {
|
||||||
));
|
));
|
||||||
o.push_str(&format!(" Desktop : {}\n", config.desktop.profile));
|
o.push_str(&format!(" Desktop : {}\n", config.desktop.profile));
|
||||||
if config.desktop.profile == crate::config::DesktopProfile::Mango {
|
if config.desktop.profile == crate::config::DesktopProfile::Mango {
|
||||||
o.push_str(
|
o.push_str(" Session : Mango + DankMaterialShell (GURU overlay)\n");
|
||||||
" Session : Mango + DankMaterialShell (GURU overlay; dwl fallback)\n",
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
o.push_str(&format!(
|
o.push_str(&format!(
|
||||||
" Flatpak : {}\n",
|
" Flatpak : {}\n",
|
||||||
|
|
|
||||||
|
|
@ -36,68 +36,14 @@ pub fn kernel_extra_packages(cpu: &CpuInfo) -> Vec<&'static str> {
|
||||||
pub fn desktop_packages(profile: DesktopProfile) -> Vec<&'static str> {
|
pub fn desktop_packages(profile: DesktopProfile) -> Vec<&'static str> {
|
||||||
match profile {
|
match profile {
|
||||||
DesktopProfile::None => vec![],
|
DesktopProfile::None => vec![],
|
||||||
DesktopProfile::Minimal => vec![
|
|
||||||
"gui-libs/wayland",
|
|
||||||
"gui-libs/wayland-protocols",
|
|
||||||
"x11-base/xwayland",
|
|
||||||
],
|
|
||||||
DesktopProfile::Dwl => dwl_desktop_packages(),
|
|
||||||
// Mango + DankMaterialShell ships the dwl session as a fallback, so the
|
|
||||||
// user always has a second compositor if the new session misbehaves.
|
|
||||||
DesktopProfile::Mango => mango_desktop_packages(),
|
DesktopProfile::Mango => mango_desktop_packages(),
|
||||||
DesktopProfile::Full => {
|
|
||||||
let mut out = dwl_desktop_packages();
|
|
||||||
out.extend([
|
|
||||||
"sys-apps/flatpak",
|
|
||||||
"net-wireless/bluez",
|
|
||||||
"gnome-base/gnome-keyring",
|
|
||||||
]);
|
|
||||||
out
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The proven dwl session (also the fallback for the Mango profile).
|
/// The canonical desktop: Mango + DankMaterialShell, plus terminal and desktop portals.
|
||||||
pub fn dwl_desktop_packages() -> Vec<&'static str> {
|
|
||||||
vec![
|
|
||||||
"gui-wm/dwl",
|
|
||||||
"gui-apps/waybar",
|
|
||||||
"gui-apps/wofi",
|
|
||||||
"gui-apps/mako",
|
|
||||||
"gui-apps/swayidle",
|
|
||||||
"gui-apps/swaylock",
|
|
||||||
"gui-apps/swaybg",
|
|
||||||
"gui-apps/wl-clipboard",
|
|
||||||
"gui-apps/grim",
|
|
||||||
"gui-apps/slurp",
|
|
||||||
"gui-libs/gtk-layer-shell",
|
|
||||||
"x11-base/xwayland",
|
|
||||||
"x11-terms/kitty",
|
|
||||||
"net-misc/networkmanager",
|
|
||||||
"sys-auth/polkit",
|
|
||||||
"gnome-extra/polkit-gnome",
|
|
||||||
// Login: greetd authenticates and runs the selected Wayland session
|
|
||||||
// (Mango by default, dwl selectable). tuigreet is the greeter.
|
|
||||||
"gui-libs/greetd",
|
|
||||||
"gui-apps/tuigreet",
|
|
||||||
// Desktop portals: required by Flatpak (file chooser, screencast,
|
|
||||||
// screenshots) and expected by many Wayland apps.
|
|
||||||
"sys-apps/xdg-desktop-portal",
|
|
||||||
"sys-apps/xdg-desktop-portal-gtk",
|
|
||||||
"gui-libs/xdg-desktop-portal-wlr",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Mango + DankMaterialShell, plus a minimal terminal/file-manager set.
|
|
||||||
///
|
|
||||||
/// The shell (panel, launcher, notifications, lock, idle, audio/network/
|
|
||||||
/// Bluetooth controls and displays) is `gui-apps/dankmaterialshell`, which
|
|
||||||
/// depends on `gui-apps/quickshell`. Both are shipped through the GURU overlay;
|
|
||||||
/// `dev-vcs/git` is required to sync that git-only overlay. `gui-wm/mangowm`
|
|
||||||
/// uses the wlroots 0.20 slot, so it coexists with dwl (wlroots 0.18).
|
|
||||||
pub fn mango_desktop_packages() -> Vec<&'static str> {
|
pub fn mango_desktop_packages() -> Vec<&'static str> {
|
||||||
let mut out = dwl_desktop_packages();
|
vec![
|
||||||
out.extend([
|
// Compositor & shell (GURU overlay)
|
||||||
"gui-wm/mangowm",
|
"gui-wm/mangowm",
|
||||||
"gui-apps/dankmaterialshell",
|
"gui-apps/dankmaterialshell",
|
||||||
"gui-apps/danksearch",
|
"gui-apps/danksearch",
|
||||||
|
|
@ -107,8 +53,27 @@ pub fn mango_desktop_packages() -> Vec<&'static str> {
|
||||||
"kde-frameworks/kimageformats",
|
"kde-frameworks/kimageformats",
|
||||||
"x11-misc/pcmanfm",
|
"x11-misc/pcmanfm",
|
||||||
"net-wireless/bluez",
|
"net-wireless/bluez",
|
||||||
]);
|
"gnome-base/gnome-keyring",
|
||||||
out
|
// Wayland clipboard and screen capture
|
||||||
|
"gui-apps/wl-clipboard",
|
||||||
|
"gui-apps/grim",
|
||||||
|
"gui-apps/slurp",
|
||||||
|
"gui-libs/gtk-layer-shell",
|
||||||
|
// XWayland & Terminal
|
||||||
|
"x11-base/xwayland",
|
||||||
|
"x11-terms/kitty",
|
||||||
|
// System and Privilege
|
||||||
|
"net-misc/networkmanager",
|
||||||
|
"sys-auth/polkit",
|
||||||
|
"gnome-extra/polkit-gnome",
|
||||||
|
// Login & Greeter
|
||||||
|
"gui-libs/greetd",
|
||||||
|
"gui-apps/tuigreet",
|
||||||
|
// Desktop portals
|
||||||
|
"sys-apps/xdg-desktop-portal",
|
||||||
|
"sys-apps/xdg-desktop-portal-gtk",
|
||||||
|
"gui-libs/xdg-desktop-portal-wlr",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn desktop_audio_packages() -> Vec<&'static str> {
|
pub fn desktop_audio_packages() -> Vec<&'static str> {
|
||||||
|
|
@ -121,7 +86,7 @@ pub fn network_target_services() -> Vec<&'static str> {
|
||||||
|
|
||||||
pub fn desktop_services(profile: DesktopProfile) -> Vec<&'static str> {
|
pub fn desktop_services(profile: DesktopProfile) -> Vec<&'static str> {
|
||||||
let mut out = vec!["NetworkManager", "systemd-resolved"];
|
let mut out = vec!["NetworkManager", "systemd-resolved"];
|
||||||
if matches!(profile, DesktopProfile::Full | DesktopProfile::Mango) {
|
if profile == DesktopProfile::Mango {
|
||||||
out.push("bluetooth");
|
out.push("bluetooth");
|
||||||
}
|
}
|
||||||
out
|
out
|
||||||
|
|
@ -396,10 +361,7 @@ pub fn package_use(config: &InstallConfig, hardware: &HardwareReport) -> String
|
||||||
o.push_str("media-libs/libglvnd X\n");
|
o.push_str("media-libs/libglvnd X\n");
|
||||||
o.push_str("x11-terms/kitty wayland\n");
|
o.push_str("x11-terms/kitty wayland\n");
|
||||||
}
|
}
|
||||||
if matches!(
|
if config.desktop.profile == DesktopProfile::Mango {
|
||||||
config.desktop.profile,
|
|
||||||
DesktopProfile::Mango | DesktopProfile::Full
|
|
||||||
) {
|
|
||||||
o.push_str("# Mango + DankMaterialShell desktop dependencies\n");
|
o.push_str("# Mango + DankMaterialShell desktop dependencies\n");
|
||||||
o.push_str("dev-cpp/cpptrace unwind\n");
|
o.push_str("dev-cpp/cpptrace unwind\n");
|
||||||
o.push_str("sys-libs/zlib minizip\n");
|
o.push_str("sys-libs/zlib minizip\n");
|
||||||
|
|
@ -449,7 +411,6 @@ pub fn accept_keywords_policy(hardware: &HardwareReport) -> String {
|
||||||
o.push_str("# Phoebus: scoped testing keywords for hardware/desktop enablement.\n");
|
o.push_str("# Phoebus: scoped testing keywords for hardware/desktop enablement.\n");
|
||||||
o.push_str("# This is NOT a global ~amd64 switch.\n");
|
o.push_str("# This is NOT a global ~amd64 switch.\n");
|
||||||
o.push_str("sys-kernel/linux-firmware\n");
|
o.push_str("sys-kernel/linux-firmware\n");
|
||||||
o.push_str("gui-wm/dwl\n");
|
|
||||||
// The NVIDIA driver is a hardware enabler; the keyword is scoped to the
|
// The NVIDIA driver is a hardware enabler; the keyword is scoped to the
|
||||||
// atom so the branch selection (and its pinned mask) stays deterministic.
|
// atom so the branch selection (and its pinned mask) stays deterministic.
|
||||||
let nvidia = crate::nvidia::NvidiaPlan::for_hardware(hardware);
|
let nvidia = crate::nvidia::NvidiaPlan::for_hardware(hardware);
|
||||||
|
|
@ -551,222 +512,17 @@ pub fn kernel_profile_config(config: &InstallConfig) -> String {
|
||||||
o
|
o
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The Wayland session entry point written to `/usr/local/bin/phoebus-session`.
|
|
||||||
///
|
|
||||||
/// Reliability properties (covered by tests):
|
|
||||||
/// * the session bus is established before any client starts;
|
|
||||||
/// * `xdg_runtime_dir` is derived when logind did not provide it;
|
|
||||||
/// * `dwl` starts first and the helper clients wait for the Wayland socket,
|
|
||||||
/// so they never race the compositor;
|
|
||||||
/// * the polkit authentication agent is started;
|
|
||||||
/// * helpers are killed when `dwl` exits, so logout leaves nothing behind.
|
|
||||||
pub const PHOEBUS_SESSION_SCRIPT: &str = r#"#!/bin/bash
|
|
||||||
# Phoebus Wayland session (generated by the installer).
|
|
||||||
#
|
|
||||||
# Start with: phoebus-session
|
|
||||||
#
|
|
||||||
# Hotkeys (dwl defaults):
|
|
||||||
# Mod+Shift+Return terminal Mod+d launcher
|
|
||||||
# Mod+Shift+q close window Mod+j / Mod+k focus next/prev
|
|
||||||
# Mod+1..9 workspace Mod+Shift+e quit dwl
|
|
||||||
|
|
||||||
set -u
|
|
||||||
|
|
||||||
# loginctl normally provides XDG_RUNTIME_DIR. Fall back to the conventional
|
|
||||||
# per-user path so a manual VT start still works.
|
|
||||||
if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
|
|
||||||
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
|
||||||
fi
|
|
||||||
if [ ! -d "$XDG_RUNTIME_DIR" ]; then
|
|
||||||
echo "phoebus-session: XDG_RUNTIME_DIR $XDG_RUNTIME_DIR is missing" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
export XDG_SESSION_TYPE=wayland
|
|
||||||
export XDG_CURRENT_DESKTOP=phoebus
|
|
||||||
export XDG_SESSION_DESKTOP=phoebus
|
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
|
||||||
export QT_QPA_PLATFORM=wayland
|
|
||||||
export GDK_BACKEND=wayland,x11
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
||||||
|
|
||||||
# Every client must share one session bus. Re-exec once under a fresh bus when
|
|
||||||
# nothing has provided one (e.g. started directly from a VT).
|
|
||||||
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ] && command -v dbus-run-session >/dev/null 2>&1; then
|
|
||||||
exec dbus-run-session -- "$0" "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use software rendering when there is no render node (e.g. a VM).
|
|
||||||
if [ -z "${WLR_RENDERER:-}" ] && [ ! -e /dev/dri/renderD128 ]; then
|
|
||||||
export WLR_RENDERER=pixman
|
|
||||||
export WLR_RENDERER_ALLOW_SOFTWARE=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
socket="${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}"
|
|
||||||
HELPERS=""
|
|
||||||
|
|
||||||
start_helper() {
|
|
||||||
"$@" >/dev/null 2>&1 &
|
|
||||||
HELPERS="$HELPERS $!"
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup() {
|
|
||||||
trap - EXIT INT TERM
|
|
||||||
for pid in $HELPERS; do
|
|
||||||
kill "$pid" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
trap cleanup EXIT INT TERM
|
|
||||||
|
|
||||||
# dwl creates the Wayland socket. Start it first, then wait for the socket so
|
|
||||||
# helpers do not race the compositor (they used to connect before wayland-0
|
|
||||||
# existed and exit immediately).
|
|
||||||
dwl &
|
|
||||||
DWL_PID=$!
|
|
||||||
|
|
||||||
waited=0
|
|
||||||
while [ ! -S "$socket" ]; do
|
|
||||||
if ! kill -0 "$DWL_PID" 2>/dev/null; then
|
|
||||||
echo "phoebus-session: dwl exited before creating $socket" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [ "$waited" -ge 100 ]; then
|
|
||||||
echo "phoebus-session: timed out waiting for $socket" >&2
|
|
||||||
kill "$DWL_PID" 2>/dev/null || true
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
sleep 0.1
|
|
||||||
waited=$((waited + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
start_helper waybar
|
|
||||||
start_helper mako
|
|
||||||
if [ -n "${PHOEBUS_WALLPAPER:-}" ] && [ -f "$PHOEBUS_WALLPAPER" ]; then
|
|
||||||
start_helper swaybg -i "$PHOEBUS_WALLPAPER"
|
|
||||||
else
|
|
||||||
start_helper swaybg -c '#1e1e2e'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# polkit authentication agent: required for graphical privilege prompts.
|
|
||||||
POLKIT_AGENT="$(command -v polkit-gnome-authentication-agent-1 2>/dev/null \
|
|
||||||
|| echo /usr/libexec/polkit-gnome-authentication-agent-1)"
|
|
||||||
if [ -x "$POLKIT_AGENT" ]; then
|
|
||||||
start_helper "$POLKIT_AGENT"
|
|
||||||
else
|
|
||||||
echo "phoebus-session: polkit agent not found; graphical authentication may fail" >&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Idle handling and screen locking (swayidle + swaylock). Locking before sleep
|
|
||||||
# means resuming never reveals the desktop.
|
|
||||||
if command -v phoebus-idle >/dev/null 2>&1; then
|
|
||||||
start_helper phoebus-idle
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run until the compositor exits, then the EXIT trap stops the helpers.
|
|
||||||
wait "$DWL_PID"
|
|
||||||
"#;
|
|
||||||
|
|
||||||
/// The `phoebus-menu` launcher / power menu (wofi).
|
|
||||||
pub const PHOEBUS_MENU_SCRIPT: &str = r#"#!/bin/bash
|
|
||||||
# Phoebus application launcher and power menu.
|
|
||||||
# phoebus-menu application launcher (wofi drun)
|
|
||||||
# phoebus-menu --power lock / suspend / log out / reboot / shut down
|
|
||||||
set -u
|
|
||||||
if [ "${1:-}" = "--power" ]; then
|
|
||||||
choice="$(printf '%s\n' 'Lock' 'Suspend' 'Log out' 'Reboot' 'Shut down' \
|
|
||||||
| wofi --dmenu --prompt 'Power')"
|
|
||||||
case "$choice" in
|
|
||||||
Lock) exec phoebus-lock ;;
|
|
||||||
Suspend) exec systemctl suspend ;;
|
|
||||||
'Log out') exec pkill -TERM dwl ;;
|
|
||||||
Reboot) exec systemctl reboot ;;
|
|
||||||
'Shut down') exec systemctl poweroff ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
exec wofi --show drun --prompt Applications
|
|
||||||
"#;
|
|
||||||
|
|
||||||
/// Screen locker.
|
|
||||||
pub const PHOEBUS_LOCK_SCRIPT: &str = r#"#!/bin/bash
|
|
||||||
# Lock the session. `-f` fails closed if the lock cannot be established.
|
|
||||||
set -u
|
|
||||||
exec swaylock -f -c 1e1e2e
|
|
||||||
"#;
|
|
||||||
|
|
||||||
/// Idle daemon: lock, then suspend, and always lock before sleeping.
|
|
||||||
pub const PHOEBUS_IDLE_SCRIPT: &str = r#"#!/bin/bash
|
|
||||||
# Idle handling: dim/lock after inactivity and lock before suspend.
|
|
||||||
set -u
|
|
||||||
exec swayidle -w \
|
|
||||||
timeout 300 'phoebus-lock' \
|
|
||||||
timeout 600 'systemctl suspend' \
|
|
||||||
before-sleep 'phoebus-lock'
|
|
||||||
"#;
|
|
||||||
|
|
||||||
/// System-wide Waybar configuration (network, audio, battery, clock, power).
|
|
||||||
pub const WAYBAR_CONFIG: &str = r#"{
|
|
||||||
"layer": "top",
|
|
||||||
"position": "top",
|
|
||||||
"height": 30,
|
|
||||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
|
||||||
"modules-center": ["sway/window"],
|
|
||||||
"modules-right": ["wireplumber", "network", "battery", "clock", "tray", "custom/power"],
|
|
||||||
"wireplumber": {
|
|
||||||
"format": "{icon} {volume}%",
|
|
||||||
"format-muted": "muted",
|
|
||||||
"on-click": "pavucontrol-qt || pavucontrol"
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"format-wifi": "wifi {essid}",
|
|
||||||
"format-ethernet": "ethernet",
|
|
||||||
"format-disconnected": "offline",
|
|
||||||
"on-click": "nm-connection-editor || nmtui"
|
|
||||||
},
|
|
||||||
"battery": {
|
|
||||||
"format": "bat {capacity}%",
|
|
||||||
"format-charging": "chg {capacity}%"
|
|
||||||
},
|
|
||||||
"clock": {
|
|
||||||
"format": "{:%a %H:%M}",
|
|
||||||
"tooltip-format": "{:%Y-%m-%d %H:%M}"
|
|
||||||
},
|
|
||||||
"custom/power": {
|
|
||||||
"format": "power",
|
|
||||||
"on-click": "phoebus-menu --power",
|
|
||||||
"tooltip": "Lock, suspend, log out, reboot"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"#;
|
|
||||||
|
|
||||||
/// System-wide Waybar styling.
|
|
||||||
pub const WAYBAR_STYLE: &str = r#"* {
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
window#waybar {
|
|
||||||
background: #1e1e2e;
|
|
||||||
color: #cdd6f4;
|
|
||||||
}
|
|
||||||
#workspaces button.focused,
|
|
||||||
#custom-power:hover {
|
|
||||||
background: #89b4fa;
|
|
||||||
color: #1e1e2e;
|
|
||||||
}
|
|
||||||
"#;
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Mango + DankMaterialShell
|
// Mango + DankMaterialShell (canonical Phoebus desktop)
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
/// The Mango session entry point written to `/usr/local/bin/phoebus-session-mango`.
|
/// The Mango session entry point written to `/usr/local/bin/phoebus-session-mango`.
|
||||||
///
|
///
|
||||||
/// It starts exactly one compositor (mango), one shell, notification, lock and
|
/// It starts exactly one compositor (mango), one shell, notification, lock and
|
||||||
/// idle implementation (all provided by DankMaterialShell), and one polkit
|
/// idle implementation (all provided by DankMaterialShell), and one polkit
|
||||||
/// agent (Quickshell's, enabled by the shell's `policykit` feature). It does
|
/// agent (Quickshell's, enabled by the shell's `policykit` feature). It seeds
|
||||||
/// **not** start the dwl helpers (waybar/mako/swaybg/swayidle/swaylock), so the
|
/// user configuration from the packaged defaults only when absent, so
|
||||||
/// two sessions never compete. It seeds user configuration from the packaged
|
/// upgrades never overwrite customization.
|
||||||
/// defaults only when absent, so upgrades never overwrite customization.
|
|
||||||
pub const PHOEBUS_MANGO_SESSION_SCRIPT: &str = r#"#!/bin/bash
|
pub const PHOEBUS_MANGO_SESSION_SCRIPT: &str = r#"#!/bin/bash
|
||||||
# Phoebus Mango + DankMaterialShell session (generated by the installer).
|
# Phoebus Mango + DankMaterialShell session (generated by the installer).
|
||||||
#
|
#
|
||||||
|
|
@ -1134,7 +890,7 @@ pub fn wayland_session_entry(profile: DesktopProfile) -> Option<(&'static str, S
|
||||||
"phoebus-mango.desktop",
|
"phoebus-mango.desktop",
|
||||||
"# Phoebus Mango session (generated by the installer).\n\
|
"# Phoebus Mango session (generated by the installer).\n\
|
||||||
[Desktop Entry]\n\
|
[Desktop Entry]\n\
|
||||||
Name=Phoebus (Mango)\n\
|
Name=Phoebus (Mango + DarkMaterial)\n\
|
||||||
Comment=Mango compositor with DankMaterialShell\n\
|
Comment=Mango compositor with DankMaterialShell\n\
|
||||||
Exec=/usr/local/bin/phoebus-session-mango\n\
|
Exec=/usr/local/bin/phoebus-session-mango\n\
|
||||||
TryExec=/usr/local/bin/phoebus-session-mango\n\
|
TryExec=/usr/local/bin/phoebus-session-mango\n\
|
||||||
|
|
@ -1142,26 +898,12 @@ pub fn wayland_session_entry(profile: DesktopProfile) -> Option<(&'static str, S
|
||||||
DesktopNames=mango\n"
|
DesktopNames=mango\n"
|
||||||
.to_string(),
|
.to_string(),
|
||||||
)),
|
)),
|
||||||
DesktopProfile::Dwl | DesktopProfile::Full => Some((
|
DesktopProfile::None => None,
|
||||||
"phoebus-dwl.desktop",
|
|
||||||
"# Phoebus dwl session (generated by the installer).\n\
|
|
||||||
[Desktop Entry]\n\
|
|
||||||
Name=Phoebus (dwl)\n\
|
|
||||||
Comment=Lightweight dwl Wayland session\n\
|
|
||||||
Exec=/usr/local/bin/phoebus-session\n\
|
|
||||||
TryExec=/usr/local/bin/phoebus-session\n\
|
|
||||||
Type=Application\n\
|
|
||||||
DesktopNames=phoebus\n"
|
|
||||||
.to_string(),
|
|
||||||
)),
|
|
||||||
_ => None,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The installed-system greetd configuration: authenticate, then run the
|
/// The installed-system greetd configuration: authenticate, then run the
|
||||||
/// selected session. `default_cmd` is the session used when the user does not
|
/// canonical Mango session. There is deliberately **no** `[initial_session]`:
|
||||||
/// pick another from the session list, so Mango is the default and the dwl
|
|
||||||
/// entry remains selectable. There is deliberately **no** `[initial_session]`:
|
|
||||||
/// the installed system always requires authentication (unlike the live ISO).
|
/// the installed system always requires authentication (unlike the live ISO).
|
||||||
pub fn greetd_config(default_cmd: &str) -> String {
|
pub fn greetd_config(default_cmd: &str) -> String {
|
||||||
format!(
|
format!(
|
||||||
|
|
@ -1199,11 +941,8 @@ pub fn greetd_config_live(live_user: &str, session_cmd: &str) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The session command used as the default desktop for a profile.
|
/// The session command used as the default desktop for a profile.
|
||||||
pub fn default_session_command(profile: DesktopProfile) -> &'static str {
|
pub fn default_session_command(_profile: DesktopProfile) -> &'static str {
|
||||||
match profile {
|
"/usr/local/bin/phoebus-session-mango"
|
||||||
DesktopProfile::Mango => "/usr/local/bin/phoebus-session-mango",
|
|
||||||
_ => "/usr/local/bin/phoebus-session",
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The live ISO's unprivileged user.
|
/// The live ISO's unprivileged user.
|
||||||
|
|
@ -1331,15 +1070,9 @@ pub fn desktop_asset(name: &str) -> Option<String> {
|
||||||
let live_cmd = "/usr/local/bin/phoebus-session-mango";
|
let live_cmd = "/usr/local/bin/phoebus-session-mango";
|
||||||
Some(match name {
|
Some(match name {
|
||||||
"session-mango" => PHOEBUS_MANGO_SESSION_SCRIPT.to_string(),
|
"session-mango" => PHOEBUS_MANGO_SESSION_SCRIPT.to_string(),
|
||||||
"session-dwl" => PHOEBUS_SESSION_SCRIPT.to_string(),
|
|
||||||
"assistant" => PHOEBUS_ASSISTANT_SCRIPT.to_string(),
|
"assistant" => PHOEBUS_ASSISTANT_SCRIPT.to_string(),
|
||||||
"install" => PHOEBUS_INSTALL_SCRIPT.to_string(),
|
"install" => PHOEBUS_INSTALL_SCRIPT.to_string(),
|
||||||
"welcome" => PHOEBUS_WELCOME_SCRIPT.to_string(),
|
"welcome" => PHOEBUS_WELCOME_SCRIPT.to_string(),
|
||||||
"menu" => PHOEBUS_MENU_SCRIPT.to_string(),
|
|
||||||
"lock" => PHOEBUS_LOCK_SCRIPT.to_string(),
|
|
||||||
"idle" => PHOEBUS_IDLE_SCRIPT.to_string(),
|
|
||||||
"waybar-config" => WAYBAR_CONFIG.to_string(),
|
|
||||||
"waybar-style" => WAYBAR_STYLE.to_string(),
|
|
||||||
"mango-config" => MANGO_CONFIG_DEFAULT.to_string(),
|
"mango-config" => MANGO_CONFIG_DEFAULT.to_string(),
|
||||||
"mango-session-target" => MANGO_SESSION_TARGET.to_string(),
|
"mango-session-target" => MANGO_SESSION_TARGET.to_string(),
|
||||||
"install-desktop" => PHOEBUS_INSTALL_DESKTOP_ENTRY.to_string(),
|
"install-desktop" => PHOEBUS_INSTALL_DESKTOP_ENTRY.to_string(),
|
||||||
|
|
@ -1352,7 +1085,6 @@ pub fn desktop_asset(name: &str) -> Option<String> {
|
||||||
"nvidia-service" => PHOEBUS_NVIDIA_SERVICE.to_string(),
|
"nvidia-service" => PHOEBUS_NVIDIA_SERVICE.to_string(),
|
||||||
"gpu-report" => PHOEBUS_GPU_REPORT_SCRIPT.to_string(),
|
"gpu-report" => PHOEBUS_GPU_REPORT_SCRIPT.to_string(),
|
||||||
"wayland-session-mango" => wayland_session_entry(DesktopProfile::Mango)?.1,
|
"wayland-session-mango" => wayland_session_entry(DesktopProfile::Mango)?.1,
|
||||||
"wayland-session-dwl" => wayland_session_entry(DesktopProfile::Dwl)?.1,
|
|
||||||
// The brand system lives in `brand`; route the shared `--emit-asset`
|
// The brand system lives in `brand`; route the shared `--emit-asset`
|
||||||
// plumbing through it so the live build has one source of assets.
|
// plumbing through it so the live build has one source of assets.
|
||||||
_ => return crate::brand::brand_asset(name),
|
_ => return crate::brand::brand_asset(name),
|
||||||
|
|
@ -1649,7 +1381,7 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn desktop_includes_portals_for_flatpak_and_wayland() {
|
fn desktop_includes_portals_for_flatpak_and_wayland() {
|
||||||
let pkgs = desktop_packages(DesktopProfile::Dwl);
|
let pkgs = desktop_packages(DesktopProfile::Mango);
|
||||||
assert!(pkgs.contains(&"sys-apps/xdg-desktop-portal"));
|
assert!(pkgs.contains(&"sys-apps/xdg-desktop-portal"));
|
||||||
assert!(pkgs.contains(&"sys-apps/xdg-desktop-portal-gtk"));
|
assert!(pkgs.contains(&"sys-apps/xdg-desktop-portal-gtk"));
|
||||||
assert!(pkgs.contains(&"gui-libs/xdg-desktop-portal-wlr"));
|
assert!(pkgs.contains(&"gui-libs/xdg-desktop-portal-wlr"));
|
||||||
|
|
@ -1662,7 +1394,7 @@ mod tests {
|
||||||
cfg.desktop.profile = DesktopProfile::None;
|
cfg.desktop.profile = DesktopProfile::None;
|
||||||
let text = package_use(&cfg, &crate::hardware::HardwareReport::default());
|
let text = package_use(&cfg, &crate::hardware::HardwareReport::default());
|
||||||
assert!(!text.contains("x11-libs/cairo X"));
|
assert!(!text.contains("x11-libs/cairo X"));
|
||||||
cfg.desktop.profile = DesktopProfile::Dwl;
|
cfg.desktop.profile = DesktopProfile::Mango;
|
||||||
let text = package_use(&cfg, &crate::hardware::HardwareReport::default());
|
let text = package_use(&cfg, &crate::hardware::HardwareReport::default());
|
||||||
assert!(text.contains("x11-libs/cairo X"));
|
assert!(text.contains("x11-libs/cairo X"));
|
||||||
assert!(text.contains("media-libs/libglvnd X"));
|
assert!(text.contains("media-libs/libglvnd X"));
|
||||||
|
|
@ -1692,7 +1424,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn package_use_is_clean_and_keeps_required_flags() {
|
fn package_use_is_clean_and_keeps_required_flags() {
|
||||||
let mut cfg = InstallConfig::default();
|
let mut cfg = InstallConfig::default();
|
||||||
cfg.desktop.profile = DesktopProfile::Dwl;
|
cfg.desktop.profile = DesktopProfile::Mango;
|
||||||
let text = package_use(&cfg, &crate::hardware::HardwareReport::default());
|
let text = package_use(&cfg, &crate::hardware::HardwareReport::default());
|
||||||
// Required boot/encryption/session flags stay.
|
// Required boot/encryption/session flags stay.
|
||||||
assert!(text.contains("sys-apps/systemd boot policykit cryptsetup"));
|
assert!(text.contains("sys-apps/systemd boot policykit cryptsetup"));
|
||||||
|
|
@ -1745,8 +1477,6 @@ mod tests {
|
||||||
// An explicit `none` keeps the minimal systemd profile.
|
// An explicit `none` keeps the minimal systemd profile.
|
||||||
cfg.desktop.profile = DesktopProfile::None;
|
cfg.desktop.profile = DesktopProfile::None;
|
||||||
assert_eq!(selected_profile(&cfg), PROFILE_SYSTEMD_MINIMAL);
|
assert_eq!(selected_profile(&cfg), PROFILE_SYSTEMD_MINIMAL);
|
||||||
cfg.desktop.profile = DesktopProfile::Dwl;
|
|
||||||
assert_eq!(selected_profile(&cfg), PROFILE_SYSTEMD_DESKTOP);
|
|
||||||
// An explicit non-default Gentoo profile is respected.
|
// An explicit non-default Gentoo profile is respected.
|
||||||
cfg.stage3.gentoo_profile = "default/linux/amd64/23.0/hardened/systemd".into();
|
cfg.stage3.gentoo_profile = "default/linux/amd64/23.0/hardened/systemd".into();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|
@ -1758,7 +1488,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn services_deduplicated() {
|
fn services_deduplicated() {
|
||||||
let mut cfg = InstallConfig::default();
|
let mut cfg = InstallConfig::default();
|
||||||
cfg.desktop.profile = DesktopProfile::Full;
|
cfg.desktop.profile = DesktopProfile::Mango;
|
||||||
let svcs = target_services(&cfg);
|
let svcs = target_services(&cfg);
|
||||||
assert!(svcs.contains(&"NetworkManager".to_string()));
|
assert!(svcs.contains(&"NetworkManager".to_string()));
|
||||||
assert!(svcs.contains(&"bluetooth".to_string()));
|
assert!(svcs.contains(&"bluetooth".to_string()));
|
||||||
|
|
@ -1766,59 +1496,6 @@ mod tests {
|
||||||
assert_eq!(count, 1);
|
assert_eq!(count, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn session_script_is_race_free_and_cleans_up() {
|
|
||||||
let script = PHOEBUS_SESSION_SCRIPT;
|
|
||||||
// The compositor starts before the clients and the clients wait for
|
|
||||||
// the socket it creates.
|
|
||||||
let dwl = script.find("dwl &").expect("starts dwl in the background");
|
|
||||||
let socket_wait = script
|
|
||||||
.find("while [ ! -S \"$socket\" ]")
|
|
||||||
.expect("waits for the wayland socket");
|
|
||||||
let waybar = script.find("start_helper waybar").expect("starts waybar");
|
|
||||||
assert!(dwl < socket_wait && socket_wait < waybar);
|
|
||||||
// A session bus and runtime dir are established.
|
|
||||||
assert!(script.contains("dbus-run-session"));
|
|
||||||
assert!(script.contains("XDG_RUNTIME_DIR"));
|
|
||||||
// The polkit agent is started when present.
|
|
||||||
assert!(script.contains("POLKIT_AGENT"));
|
|
||||||
// Helpers are reaped when the compositor exits.
|
|
||||||
assert!(script.contains("cleanup()"));
|
|
||||||
assert!(script.contains("trap cleanup EXIT INT TERM"));
|
|
||||||
assert!(script.contains("wait \"$DWL_PID\""));
|
|
||||||
assert!(!script.contains("exec dwl"));
|
|
||||||
// Idle handling starts with the session.
|
|
||||||
assert!(script.contains("start_helper phoebus-idle"));
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn desktop_helpers_cover_launch_lock_idle_and_power() {
|
|
||||||
let menu = PHOEBUS_MENU_SCRIPT;
|
|
||||||
assert!(menu.contains("wofi --show drun"));
|
|
||||||
for action in ["Lock", "Suspend", "Log out", "Reboot", "Shut down"] {
|
|
||||||
assert!(menu.contains(action), "power menu missing {action}");
|
|
||||||
}
|
|
||||||
assert!(menu.contains("systemctl suspend"));
|
|
||||||
assert!(menu.contains("systemctl reboot"));
|
|
||||||
assert!(menu.contains("systemctl poweroff"));
|
|
||||||
assert!(menu.contains("pkill -TERM dwl"));
|
|
||||||
|
|
||||||
assert!(PHOEBUS_LOCK_SCRIPT.contains("swaylock -f"));
|
|
||||||
assert!(PHOEBUS_IDLE_SCRIPT.contains("swayidle"));
|
|
||||||
assert!(PHOEBUS_IDLE_SCRIPT.contains("before-sleep 'phoebus-lock'"));
|
|
||||||
assert!(PHOEBUS_IDLE_SCRIPT.contains("systemctl suspend"));
|
|
||||||
|
|
||||||
// Network and audio controls are present and actionable.
|
|
||||||
let waybar = WAYBAR_CONFIG;
|
|
||||||
assert!(waybar.contains("\"wireplumber\""));
|
|
||||||
assert!(waybar.contains("\"network\""));
|
|
||||||
assert!(waybar.contains("nm-connection-editor"));
|
|
||||||
assert!(waybar.contains("custom/power"));
|
|
||||||
assert!(waybar.contains("phoebus-menu --power"));
|
|
||||||
assert!(waybar.contains("battery"));
|
|
||||||
assert!(waybar.contains("clock"));
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn encrypted_cmdline_requires_uuid() {
|
fn encrypted_cmdline_requires_uuid() {
|
||||||
let cfg = InstallConfig::default();
|
let cfg = InstallConfig::default();
|
||||||
|
|
@ -1827,15 +1504,20 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn mango_profile_selects_guru_stack_and_keeps_dwl_fallback() {
|
fn mango_profile_selects_guru_stack() {
|
||||||
let pkgs = desktop_packages(DesktopProfile::Mango);
|
let pkgs = desktop_packages(DesktopProfile::Mango);
|
||||||
assert!(pkgs.contains(&"gui-wm/mangowm"));
|
assert!(pkgs.contains(&"gui-wm/mangowm"));
|
||||||
assert!(pkgs.contains(&"gui-apps/dankmaterialshell"));
|
assert!(pkgs.contains(&"gui-apps/dankmaterialshell"));
|
||||||
assert!(pkgs.contains(&"gui-apps/danksearch"));
|
assert!(pkgs.contains(&"gui-apps/danksearch"));
|
||||||
assert!(pkgs.contains(&"dev-vcs/git"));
|
assert!(pkgs.contains(&"dev-vcs/git"));
|
||||||
// The dwl compositor and helpers remain as a fallback.
|
// Standalone dwl and helpers must not be present.
|
||||||
assert!(pkgs.contains(&"gui-wm/dwl"));
|
assert!(!pkgs.contains(&"gui-wm/dwl"));
|
||||||
assert!(pkgs.contains(&"gui-apps/waybar"));
|
assert!(!pkgs.contains(&"gui-apps/waybar"));
|
||||||
|
assert!(!pkgs.contains(&"gui-apps/wofi"));
|
||||||
|
assert!(!pkgs.contains(&"gui-apps/mako"));
|
||||||
|
assert!(!pkgs.contains(&"gui-apps/swaybg"));
|
||||||
|
assert!(!pkgs.contains(&"gui-apps/swayidle"));
|
||||||
|
assert!(!pkgs.contains(&"gui-apps/swaylock"));
|
||||||
// Portals and the shared Wayland stack are present.
|
// Portals and the shared Wayland stack are present.
|
||||||
assert!(pkgs.contains(&"sys-apps/xdg-desktop-portal-gtk"));
|
assert!(pkgs.contains(&"sys-apps/xdg-desktop-portal-gtk"));
|
||||||
assert!(pkgs.contains(&"gui-libs/xdg-desktop-portal-wlr"));
|
assert!(pkgs.contains(&"gui-libs/xdg-desktop-portal-wlr"));
|
||||||
|
|
@ -1953,8 +1635,8 @@ mod tests {
|
||||||
"/usr/local/bin/phoebus-session-mango"
|
"/usr/local/bin/phoebus-session-mango"
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
default_session_command(DesktopProfile::Dwl),
|
default_session_command(DesktopProfile::None),
|
||||||
"/usr/local/bin/phoebus-session"
|
"/usr/local/bin/phoebus-session-mango"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1985,9 +1667,8 @@ mod tests {
|
||||||
assert!(desktop_asset("greetd-installed")
|
assert!(desktop_asset("greetd-installed")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.contains("phoebus-session-mango"));
|
.contains("phoebus-session-mango"));
|
||||||
assert!(desktop_asset("wayland-session-dwl")
|
assert!(desktop_asset("wayland-session-dwl").is_none());
|
||||||
.unwrap()
|
assert!(desktop_asset("session-dwl").is_none());
|
||||||
.contains("phoebus-session"));
|
|
||||||
assert!(desktop_asset("install-desktop")
|
assert!(desktop_asset("install-desktop")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.contains("Install Phoebus"));
|
.contains("Install Phoebus"));
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
//! Desktop profile installation.
|
//! Desktop profile installation.
|
||||||
//!
|
//!
|
||||||
//! The flagship desktop is a small Wayland tiling environment centred on dwl,
|
//! The Phoebus desktop is Mango (wlroots tiling compositor) + DarkMaterial
|
||||||
//! with PipeWire/WirePlumber audio. Flatpak is supported out of the box.
|
//! (DankMaterialShell), with PipeWire/WirePlumber audio. Flatpak is supported out of the box.
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
|
@ -50,13 +50,7 @@ pub fn install(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Write `/usr/local/bin/phoebus-session`, a clear manual entry point for the
|
/// Write `/usr/local/bin/phoebus-session-mango` and the wrapper `/usr/local/bin/phoebus-session`.
|
||||||
/// Wayland desktop. It starts the supporting daemons and then execs dwl.
|
|
||||||
///
|
|
||||||
/// Hotkeys (dwl defaults, Phoebus patches may add more):
|
|
||||||
/// Mod+Shift+Return terminal Mod+d launcher
|
|
||||||
/// Mod+Shift+q close window Mod+j / Mod+k focus next/prev
|
|
||||||
/// Mod+1..9 workspace Mod+Shift+e quit dwl
|
|
||||||
pub fn write_session_script(exec: &Exec, config: &InstallConfig) -> Result<()> {
|
pub fn write_session_script(exec: &Exec, config: &InstallConfig) -> Result<()> {
|
||||||
if config.desktop.profile == DesktopProfile::None {
|
if config.desktop.profile == DesktopProfile::None {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
|
@ -78,70 +72,24 @@ pub fn write_session_script(exec: &Exec, config: &InstallConfig) -> Result<()> {
|
||||||
match config.desktop.profile {
|
match config.desktop.profile {
|
||||||
DesktopProfile::Mango => {
|
DesktopProfile::Mango => {
|
||||||
write_mango_session(exec, &target)?;
|
write_mango_session(exec, &target)?;
|
||||||
// The dwl session stays installed as a fallback.
|
|
||||||
write_dwl_session(exec, &target)?;
|
|
||||||
}
|
}
|
||||||
DesktopProfile::Dwl | DesktopProfile::Full => {
|
DesktopProfile::None => {}
|
||||||
write_dwl_session(exec, &target)?;
|
|
||||||
}
|
|
||||||
// Minimal has no session entry point.
|
|
||||||
_ => {}
|
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_dwl_session(exec: &Exec, target: &phoebus_core::TargetRoot) -> Result<()> {
|
|
||||||
let script = sysgen::PHOEBUS_SESSION_SCRIPT;
|
|
||||||
let path = target.resolve("usr/local/bin/phoebus-session")?;
|
|
||||||
target.write("usr/local/bin/phoebus-session", script)?;
|
|
||||||
use std::os::unix::fs::PermissionsExt;
|
|
||||||
std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o755))
|
|
||||||
.map_err(|e| ExecError::io(path.clone(), e))?;
|
|
||||||
if !path.is_file() {
|
|
||||||
return Err(ExecError::operation(
|
|
||||||
"desktop",
|
|
||||||
"write session script",
|
|
||||||
format!("session script missing after write: {}", path.display()),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Launcher/power menu, screen locker and idle daemon. Installing these (and
|
|
||||||
// the Waybar configuration below) completes the discoverable desktop: a
|
|
||||||
// user can launch apps, control network/audio, lock and suspend without
|
|
||||||
// editing configuration by hand.
|
|
||||||
write_script(
|
|
||||||
&target,
|
|
||||||
"usr/local/bin/phoebus-menu",
|
|
||||||
sysgen::PHOEBUS_MENU_SCRIPT,
|
|
||||||
)?;
|
|
||||||
write_script(
|
|
||||||
&target,
|
|
||||||
"usr/local/bin/phoebus-lock",
|
|
||||||
sysgen::PHOEBUS_LOCK_SCRIPT,
|
|
||||||
)?;
|
|
||||||
write_script(
|
|
||||||
&target,
|
|
||||||
"usr/local/bin/phoebus-idle",
|
|
||||||
sysgen::PHOEBUS_IDLE_SCRIPT,
|
|
||||||
)?;
|
|
||||||
target.write("etc/xdg/waybar/config", sysgen::WAYBAR_CONFIG)?;
|
|
||||||
target.write("etc/xdg/waybar/style.css", sysgen::WAYBAR_STYLE)?;
|
|
||||||
if let Some((name, entry)) = sysgen::wayland_session_entry(DesktopProfile::Dwl) {
|
|
||||||
target.write(&format!("usr/share/wayland-sessions/{name}"), entry)?;
|
|
||||||
}
|
|
||||||
exec.logger.info(format!(
|
|
||||||
"wrote /usr/local/bin/phoebus-session ({})",
|
|
||||||
path.display()
|
|
||||||
));
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn write_mango_session(exec: &Exec, target: &phoebus_core::TargetRoot) -> Result<()> {
|
fn write_mango_session(exec: &Exec, target: &phoebus_core::TargetRoot) -> Result<()> {
|
||||||
write_script(
|
write_script(
|
||||||
target,
|
target,
|
||||||
"usr/local/bin/phoebus-session-mango",
|
"usr/local/bin/phoebus-session-mango",
|
||||||
sysgen::PHOEBUS_MANGO_SESSION_SCRIPT,
|
sysgen::PHOEBUS_MANGO_SESSION_SCRIPT,
|
||||||
)?;
|
)?;
|
||||||
|
// Convenience wrapper so manual VT invocation launches the canonical session.
|
||||||
|
write_script(
|
||||||
|
target,
|
||||||
|
"usr/local/bin/phoebus-session",
|
||||||
|
"#!/bin/bash\nexec /usr/local/bin/phoebus-session-mango \"$@\"\n",
|
||||||
|
)?;
|
||||||
target.write("etc/xdg/mango/config.conf", sysgen::MANGO_CONFIG_DEFAULT)?;
|
target.write("etc/xdg/mango/config.conf", sysgen::MANGO_CONFIG_DEFAULT)?;
|
||||||
target.write(
|
target.write(
|
||||||
"usr/lib/systemd/user/mango-session.target",
|
"usr/lib/systemd/user/mango-session.target",
|
||||||
|
|
@ -272,61 +220,6 @@ mod tests {
|
||||||
Exec::new(Box::new(runner), logger, false, path.join("root"), path)
|
Exec::new(Box::new(runner), logger, false, path.join("root"), path)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn session_script_waits_for_the_socket_and_starts_polkit() {
|
|
||||||
let runner = RecordingRunner::new();
|
|
||||||
let exec = make_exec(runner);
|
|
||||||
let mut cfg = InstallConfig::default();
|
|
||||||
cfg.desktop.profile = DesktopProfile::Dwl;
|
|
||||||
write_session_script(&exec, &cfg).unwrap();
|
|
||||||
let path = exec.root.join("usr/local/bin/phoebus-session");
|
|
||||||
let text = std::fs::read_to_string(&path).unwrap();
|
|
||||||
// dwl is started first and waited on; helpers wait for the socket.
|
|
||||||
assert!(text.contains("dwl &"));
|
|
||||||
assert!(text.contains("wait \"$DWL_PID\""));
|
|
||||||
assert!(!text.contains("exec dwl"), "exec would skip helper cleanup");
|
|
||||||
assert!(text.contains("wayland-0"));
|
|
||||||
assert!(text.contains("polkit-gnome-authentication-agent-1"));
|
|
||||||
assert!(text.contains("start_helper waybar"));
|
|
||||||
assert!(text.contains("trap cleanup EXIT INT TERM"));
|
|
||||||
use std::os::unix::fs::PermissionsExt;
|
|
||||||
assert_ne!(
|
|
||||||
std::fs::metadata(&path).unwrap().permissions().mode() & 0o111,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn session_helpers_and_waybar_config_are_installed() {
|
|
||||||
let runner = RecordingRunner::new();
|
|
||||||
let exec = make_exec(runner);
|
|
||||||
let mut cfg = InstallConfig::default();
|
|
||||||
cfg.desktop.profile = DesktopProfile::Dwl;
|
|
||||||
write_session_script(&exec, &cfg).unwrap();
|
|
||||||
for rel in [
|
|
||||||
"usr/local/bin/phoebus-menu",
|
|
||||||
"usr/local/bin/phoebus-lock",
|
|
||||||
"usr/local/bin/phoebus-idle",
|
|
||||||
"etc/xdg/waybar/config",
|
|
||||||
"etc/xdg/waybar/style.css",
|
|
||||||
] {
|
|
||||||
let path = exec.root.join(rel);
|
|
||||||
assert!(path.is_file(), "{rel} was not installed");
|
|
||||||
}
|
|
||||||
use std::os::unix::fs::PermissionsExt;
|
|
||||||
for rel in [
|
|
||||||
"usr/local/bin/phoebus-menu",
|
|
||||||
"usr/local/bin/phoebus-lock",
|
|
||||||
"usr/local/bin/phoebus-idle",
|
|
||||||
] {
|
|
||||||
let mode = std::fs::metadata(exec.root.join(rel))
|
|
||||||
.unwrap()
|
|
||||||
.permissions()
|
|
||||||
.mode();
|
|
||||||
assert_ne!(mode & 0o111, 0, "{rel} must be executable");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn no_session_script_for_none_profile() {
|
fn no_session_script_for_none_profile() {
|
||||||
let runner = RecordingRunner::new();
|
let runner = RecordingRunner::new();
|
||||||
|
|
@ -335,12 +228,16 @@ mod tests {
|
||||||
cfg.desktop.profile = DesktopProfile::None;
|
cfg.desktop.profile = DesktopProfile::None;
|
||||||
write_session_script(&exec, &cfg).unwrap();
|
write_session_script(&exec, &cfg).unwrap();
|
||||||
assert!(!exec.root.join("usr/local/bin/phoebus-session").exists());
|
assert!(!exec.root.join("usr/local/bin/phoebus-session").exists());
|
||||||
|
assert!(!exec
|
||||||
|
.root
|
||||||
|
.join("usr/local/bin/phoebus-session-mango")
|
||||||
|
.exists());
|
||||||
// An explicit `none` also writes no assistant launcher.
|
// An explicit `none` also writes no assistant launcher.
|
||||||
assert!(!exec.root.join("usr/local/bin/phoebus-assistant").exists());
|
assert!(!exec.root.join("usr/local/bin/phoebus-assistant").exists());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn mango_profile_installs_both_sessions_and_no_dwl_helpers_in_mango() {
|
fn mango_profile_installs_canonical_session_and_no_dwl_artifacts() {
|
||||||
let runner = RecordingRunner::new();
|
let runner = RecordingRunner::new();
|
||||||
let exec = make_exec(runner);
|
let exec = make_exec(runner);
|
||||||
let mut cfg = InstallConfig::default();
|
let mut cfg = InstallConfig::default();
|
||||||
|
|
@ -353,10 +250,20 @@ mod tests {
|
||||||
"etc/xdg/mango/config.conf",
|
"etc/xdg/mango/config.conf",
|
||||||
"usr/lib/systemd/user/mango-session.target",
|
"usr/lib/systemd/user/mango-session.target",
|
||||||
"usr/share/wayland-sessions/phoebus-mango.desktop",
|
"usr/share/wayland-sessions/phoebus-mango.desktop",
|
||||||
"usr/share/wayland-sessions/phoebus-dwl.desktop",
|
|
||||||
] {
|
] {
|
||||||
assert!(exec.root.join(rel).is_file(), "{rel} was not installed");
|
assert!(exec.root.join(rel).is_file(), "{rel} was not installed");
|
||||||
}
|
}
|
||||||
|
// Standalone dwl session entry and helpers must NOT be installed.
|
||||||
|
for rel in [
|
||||||
|
"usr/share/wayland-sessions/phoebus-dwl.desktop",
|
||||||
|
"usr/local/bin/phoebus-menu",
|
||||||
|
"usr/local/bin/phoebus-lock",
|
||||||
|
"usr/local/bin/phoebus-idle",
|
||||||
|
"etc/xdg/waybar/config",
|
||||||
|
"etc/xdg/waybar/style.css",
|
||||||
|
] {
|
||||||
|
assert!(!exec.root.join(rel).exists(), "{rel} must not be installed");
|
||||||
|
}
|
||||||
let mango =
|
let mango =
|
||||||
std::fs::read_to_string(exec.root.join("usr/local/bin/phoebus-session-mango")).unwrap();
|
std::fs::read_to_string(exec.root.join("usr/local/bin/phoebus-session-mango")).unwrap();
|
||||||
for helper in ["waybar", "mako", "swaybg", "swayidle", "swaylock"] {
|
for helper in ["waybar", "mako", "swaybg", "swayidle", "swaylock"] {
|
||||||
|
|
@ -366,10 +273,15 @@ mod tests {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
assert!(mango.contains("dms run") || mango.contains("mango-session.target"));
|
assert!(mango.contains("dms run") || mango.contains("mango-session.target"));
|
||||||
let dwl = std::fs::read_to_string(exec.root.join("usr/local/bin/phoebus-session")).unwrap();
|
let session =
|
||||||
|
std::fs::read_to_string(exec.root.join("usr/local/bin/phoebus-session")).unwrap();
|
||||||
assert!(
|
assert!(
|
||||||
dwl.contains("dwl &"),
|
session.contains("phoebus-session-mango"),
|
||||||
"dwl fallback session must be present"
|
"phoebus-session wrapper must invoke phoebus-session-mango"
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
!session.contains("dwl &"),
|
||||||
|
"standalone dwl must not be in phoebus-session"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
//! Functional test of the generated `phoebus-session` script.
|
//! Functional test of the generated `phoebus-session-mango` script.
|
||||||
//!
|
//!
|
||||||
//! Runs the real script against stub `dwl`/helper binaries so the startup
|
//! Runs the real script against stub `mango`/`dms` binaries so the startup
|
||||||
//! ordering, the Wayland-socket wait, the polkit agent and helper cleanup are
|
//! ordering, the Wayland-socket discovery, DMS launch, and helper cleanup are
|
||||||
//! exercised without a physical seat or a Wayland compositor.
|
//! exercised without a physical seat or a Wayland compositor.
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::{Child, Command, Stdio};
|
use std::process::{Child, Command, Stdio};
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
use phoebus_core::system::PHOEBUS_SESSION_SCRIPT;
|
use phoebus_core::system::PHOEBUS_MANGO_SESSION_SCRIPT;
|
||||||
|
|
||||||
fn write_exec(path: &Path, body: &str) {
|
fn write_exec(path: &Path, body: &str) {
|
||||||
std::fs::write(path, body).unwrap();
|
std::fs::write(path, body).unwrap();
|
||||||
|
|
@ -16,22 +16,21 @@ fn write_exec(path: &Path, body: &str) {
|
||||||
std::fs::set_permissions(path, std::fs::Permissions::from_mode(0o755)).unwrap();
|
std::fs::set_permissions(path, std::fs::Permissions::from_mode(0o755)).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// dwl stub: creates a real unix socket at $XDG_RUNTIME_DIR/wayland-0 and exits
|
/// mango stub: creates a real unix socket at $XDG_RUNTIME_DIR/wayland-0 and exits
|
||||||
/// after a moment so the session ends.
|
/// after a moment so the session ends.
|
||||||
const DWL_OK: &str = r#"#!/bin/sh
|
const MANGO_OK: &str = r#"#!/bin/sh
|
||||||
echo dwl-started >> "$SESSION_TEST_DIR/dwl.log"
|
echo mango-started >> "$SESSION_TEST_DIR/mango.log"
|
||||||
exec python3 -c 'import os,socket,time; s=socket.socket(socket.AF_UNIX); s.bind(os.path.join(os.environ["XDG_RUNTIME_DIR"],"wayland-0")); s.listen(1); time.sleep(3)'
|
exec python3 -c 'import os,socket,time; s=socket.socket(socket.AF_UNIX); s.bind(os.path.join(os.environ["XDG_RUNTIME_DIR"],"wayland-0")); s.listen(1); time.sleep(3)'
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
/// dwl stub that fails before creating the socket.
|
/// mango stub that fails before creating the socket.
|
||||||
const DWL_FAIL: &str = "#!/bin/sh\nexit 1\n";
|
const MANGO_FAIL: &str = "#!/bin/sh\nexit 1\n";
|
||||||
|
|
||||||
/// Helper stub: records whether the Wayland socket existed when it started,
|
/// DMS stub: records whether the Wayland socket existed when it started,
|
||||||
/// stores its pid, then sleeps so cleanup has something to kill.
|
/// stores its pid, then sleeps so cleanup has something to kill.
|
||||||
const HELPER: &str = r#"#!/bin/sh
|
const DMS_STUB: &str = r#"#!/bin/sh
|
||||||
name="$(basename "$0")"
|
|
||||||
if [ -S "$XDG_RUNTIME_DIR/wayland-0" ]; then s=ok; else s=missing; fi
|
if [ -S "$XDG_RUNTIME_DIR/wayland-0" ]; then s=ok; else s=missing; fi
|
||||||
echo "$name $s" >> "$SESSION_TEST_DIR/helpers.log"
|
echo "dms $s wayland_display=${WAYLAND_DISPLAY:-missing}" >> "$SESSION_TEST_DIR/helpers.log"
|
||||||
echo $$ >> "$SESSION_TEST_DIR/helper-pids"
|
echo $$ >> "$SESSION_TEST_DIR/helper-pids"
|
||||||
exec sleep 30
|
exec sleep 30
|
||||||
"#;
|
"#;
|
||||||
|
|
@ -58,23 +57,16 @@ struct Fixture {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Fixture {
|
impl Fixture {
|
||||||
fn new(dwl_body: &str) -> Self {
|
fn new(mango_body: &str) -> Self {
|
||||||
let dir = tempfile::tempdir().unwrap();
|
let dir = tempfile::tempdir().unwrap();
|
||||||
let bin = dir.path().join("bin");
|
let bin = dir.path().join("bin");
|
||||||
let runtime = dir.path().join("runtime");
|
let runtime = dir.path().join("runtime");
|
||||||
std::fs::create_dir_all(&bin).unwrap();
|
std::fs::create_dir_all(&bin).unwrap();
|
||||||
std::fs::create_dir_all(&runtime).unwrap();
|
std::fs::create_dir_all(&runtime).unwrap();
|
||||||
let script = dir.path().join("phoebus-session");
|
let script = dir.path().join("phoebus-session-mango");
|
||||||
write_exec(&script, PHOEBUS_SESSION_SCRIPT);
|
write_exec(&script, PHOEBUS_MANGO_SESSION_SCRIPT);
|
||||||
write_exec(&bin.join("dwl"), dwl_body);
|
write_exec(&bin.join("mango"), mango_body);
|
||||||
for helper in [
|
write_exec(&bin.join("dms"), DMS_STUB);
|
||||||
"waybar",
|
|
||||||
"mako",
|
|
||||||
"swaybg",
|
|
||||||
"polkit-gnome-authentication-agent-1",
|
|
||||||
] {
|
|
||||||
write_exec(&bin.join(helper), HELPER);
|
|
||||||
}
|
|
||||||
Self {
|
Self {
|
||||||
dir,
|
dir,
|
||||||
script,
|
script,
|
||||||
|
|
@ -114,26 +106,26 @@ impl Fixture {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn helpers_wait_for_the_socket_and_are_reaped() {
|
fn helpers_wait_for_the_socket_and_are_reaped() {
|
||||||
let fixture = Fixture::new(DWL_OK);
|
let fixture = Fixture::new(MANGO_OK);
|
||||||
let (status, stderr) = fixture.run();
|
let (status, stderr) = fixture.run();
|
||||||
assert!(status.success(), "session failed: {stderr}");
|
assert!(status.success(), "session failed: {stderr}");
|
||||||
|
|
||||||
// Every helper observed the socket: they did not race the compositor.
|
// Mango started and DMS observed the socket and exported WAYLAND_DISPLAY.
|
||||||
|
let mango_log = fixture.read("mango.log");
|
||||||
|
assert!(mango_log.contains("mango-started"));
|
||||||
|
|
||||||
let log = fixture.read("helpers.log");
|
let log = fixture.read("helpers.log");
|
||||||
for name in [
|
assert!(log.contains("dms ok"), "helper log: {log:?}");
|
||||||
"waybar",
|
assert!(
|
||||||
"mako",
|
log.contains("wayland_display=wayland-0"),
|
||||||
"swaybg",
|
"helper log: {log:?}"
|
||||||
"polkit-gnome-authentication-agent-1",
|
);
|
||||||
] {
|
|
||||||
assert!(log.contains(&format!("{name} ok")), "helper log: {log:?}");
|
|
||||||
}
|
|
||||||
assert!(
|
assert!(
|
||||||
!log.contains("missing"),
|
!log.contains("missing"),
|
||||||
"a helper raced the socket: {log:?}"
|
"a helper raced the socket: {log:?}"
|
||||||
);
|
);
|
||||||
|
|
||||||
// The helpers were killed when dwl exited (logout leaves nothing behind).
|
// The helpers were killed when mango exited (logout leaves nothing behind).
|
||||||
let pids = fixture.read("helper-pids");
|
let pids = fixture.read("helper-pids");
|
||||||
assert!(!pids.trim().is_empty(), "no helper pids recorded");
|
assert!(!pids.trim().is_empty(), "no helper pids recorded");
|
||||||
std::thread::sleep(Duration::from_millis(300));
|
std::thread::sleep(Duration::from_millis(300));
|
||||||
|
|
@ -147,9 +139,12 @@ fn helpers_wait_for_the_socket_and_are_reaped() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn failure_to_create_the_socket_is_reported() {
|
fn failure_to_create_the_socket_is_reported() {
|
||||||
let fixture = Fixture::new(DWL_FAIL);
|
let fixture = Fixture::new(MANGO_FAIL);
|
||||||
let (status, stderr) = fixture.run();
|
let (status, stderr) = fixture.run();
|
||||||
assert!(!status.success(), "a dead compositor must fail the session");
|
assert!(!status.success(), "a dead compositor must fail the session");
|
||||||
assert!(stderr.contains("dwl exited before creating"), "{stderr}");
|
assert!(
|
||||||
|
stderr.contains("mango exited before creating a Wayland socket"),
|
||||||
|
"{stderr}"
|
||||||
|
);
|
||||||
assert!(fixture.read("helpers.log").is_empty());
|
assert!(fixture.read("helpers.log").is_empty());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -844,16 +844,7 @@ impl Installer {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DesktopProfile::Dwl | DesktopProfile::Full => {
|
DesktopProfile::None => {}
|
||||||
if !target.exists("usr/local/bin/phoebus-session") {
|
|
||||||
return Err(phoebus_executor::ExecError::operation(
|
|
||||||
"finalize",
|
|
||||||
"verify target",
|
|
||||||
"session script /usr/local/bin/phoebus-session missing",
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if !target.exists("etc/greetd/config.toml") {
|
if !target.exists("etc/greetd/config.toml") {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,8 @@ Software:
|
||||||
Package policy : balanced
|
Package policy : balanced
|
||||||
Binary pkgs : yes
|
Binary pkgs : yes
|
||||||
Accept license : @FREE @BINARY-REDISTRIBUTABLE
|
Accept license : @FREE @BINARY-REDISTRIBUTABLE
|
||||||
Desktop : dwl
|
Desktop : mango
|
||||||
|
Session : Mango + DankMaterialShell (GURU overlay)
|
||||||
Flatpak : yes
|
Flatpak : yes
|
||||||
Audio : pipewire
|
Audio : pipewire
|
||||||
AI assistant : no
|
AI assistant : no
|
||||||
|
|
|
||||||
|
|
@ -163,12 +163,11 @@ fn live_login_autologins_and_the_configs_are_separate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn both_session_entries_are_shipped_for_the_fallback() {
|
fn only_mango_session_entry_is_shipped() {
|
||||||
let mango = system::desktop_asset("wayland-session-mango").unwrap();
|
let mango = system::desktop_asset("wayland-session-mango").unwrap();
|
||||||
let dwl = system::desktop_asset("wayland-session-dwl").unwrap();
|
|
||||||
assert!(mango.contains("Exec=/usr/local/bin/phoebus-session-mango"));
|
assert!(mango.contains("Exec=/usr/local/bin/phoebus-session-mango"));
|
||||||
assert!(dwl.contains("Exec=/usr/local/bin/phoebus-session"));
|
assert!(system::desktop_asset("wayland-session-dwl").is_none());
|
||||||
assert_ne!(mango, dwl);
|
assert!(system::desktop_asset("session-dwl").is_none());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
@ -180,13 +179,13 @@ fn default_config_omits_to_mango_and_overrides_are_respected() {
|
||||||
assert!(InstallConfig::default().desktop.flatpak);
|
assert!(InstallConfig::default().desktop.flatpak);
|
||||||
for (value, expected) in [
|
for (value, expected) in [
|
||||||
("none", DesktopProfile::None),
|
("none", DesktopProfile::None),
|
||||||
("dwl", DesktopProfile::Dwl),
|
|
||||||
("full", DesktopProfile::Full),
|
|
||||||
("mango", DesktopProfile::Mango),
|
("mango", DesktopProfile::Mango),
|
||||||
] {
|
] {
|
||||||
let cfg = InstallConfig::from_legacy(&format!("DESKTOP_PROFILE='{value}'\n")).unwrap();
|
let cfg = InstallConfig::from_legacy(&format!("DESKTOP_PROFILE='{value}'\n")).unwrap();
|
||||||
assert_eq!(cfg.desktop.profile, expected);
|
assert_eq!(cfg.desktop.profile, expected);
|
||||||
}
|
}
|
||||||
|
// Standalone dwl is obsolete and rejected.
|
||||||
|
assert!(InstallConfig::from_legacy("DESKTOP_PROFILE='dwl'\n").is_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ COMPRESS='zstd:3'\n\
|
||||||
KERNEL_PROFILE='safe'\n\
|
KERNEL_PROFILE='safe'\n\
|
||||||
KERNEL_CONSOLE='console=tty0'\n\
|
KERNEL_CONSOLE='console=tty0'\n\
|
||||||
PACKAGE_POLICY='balanced'\n\
|
PACKAGE_POLICY='balanced'\n\
|
||||||
DESKTOP_PROFILE='dwl'\n\
|
DESKTOP_PROFILE='mango'\n\
|
||||||
BTRFS_SUBVOLS='@ @home @var @snapshots @swap'\n";
|
BTRFS_SUBVOLS='@ @home @var @snapshots @swap'\n";
|
||||||
|
|
||||||
fn sample_config() -> InstallConfig {
|
fn sample_config() -> InstallConfig {
|
||||||
|
|
|
||||||
|
|
@ -392,11 +392,8 @@ fn choice_options(choice: Choice, _config: &InstallConfig) -> Vec<String> {
|
||||||
PackagePolicy::BinaryFirst.to_string(),
|
PackagePolicy::BinaryFirst.to_string(),
|
||||||
],
|
],
|
||||||
Choice::DesktopProfile => vec![
|
Choice::DesktopProfile => vec![
|
||||||
DesktopProfile::None.to_string(),
|
|
||||||
DesktopProfile::Dwl.to_string(),
|
|
||||||
DesktopProfile::Mango.to_string(),
|
DesktopProfile::Mango.to_string(),
|
||||||
DesktopProfile::Minimal.to_string(),
|
DesktopProfile::None.to_string(),
|
||||||
DesktopProfile::Full.to_string(),
|
|
||||||
],
|
],
|
||||||
Choice::AiProvider => vec!["none".into(), "deepseek".into(), "openai".into()],
|
Choice::AiProvider => vec!["none".into(), "deepseek".into(), "openai".into()],
|
||||||
}
|
}
|
||||||
|
|
@ -444,13 +441,7 @@ fn apply_choice(choice: Choice, index: usize, config: &mut InstallConfig) {
|
||||||
][index.min(2)];
|
][index.min(2)];
|
||||||
}
|
}
|
||||||
Choice::DesktopProfile => {
|
Choice::DesktopProfile => {
|
||||||
config.desktop.profile = [
|
config.desktop.profile = [DesktopProfile::Mango, DesktopProfile::None][index.min(1)];
|
||||||
DesktopProfile::None,
|
|
||||||
DesktopProfile::Dwl,
|
|
||||||
DesktopProfile::Mango,
|
|
||||||
DesktopProfile::Minimal,
|
|
||||||
DesktopProfile::Full,
|
|
||||||
][index.min(4)];
|
|
||||||
}
|
}
|
||||||
Choice::AiProvider => {
|
Choice::AiProvider => {
|
||||||
let provider = ["none", "deepseek", "openai"][index.min(2)];
|
let provider = ["none", "deepseek", "openai"][index.min(2)];
|
||||||
|
|
@ -617,7 +608,9 @@ mod tests {
|
||||||
fn apply_choice_sets_values() {
|
fn apply_choice_sets_values() {
|
||||||
let mut config = InstallConfig::default();
|
let mut config = InstallConfig::default();
|
||||||
apply_choice(Choice::DesktopProfile, 1, &mut config);
|
apply_choice(Choice::DesktopProfile, 1, &mut config);
|
||||||
assert_eq!(config.desktop.profile, DesktopProfile::Dwl);
|
assert_eq!(config.desktop.profile, DesktopProfile::None);
|
||||||
|
apply_choice(Choice::DesktopProfile, 0, &mut config);
|
||||||
|
assert_eq!(config.desktop.profile, DesktopProfile::Mango);
|
||||||
apply_choice(Choice::Encryption, 1, &mut config);
|
apply_choice(Choice::Encryption, 1, &mut config);
|
||||||
assert_eq!(config.encryption.mode, Encryption::None);
|
assert_eq!(config.encryption.mode, Encryption::None);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ launcher is missing; it never silently emits a text-only ISO.
|
||||||
`live-sudoers`, installed to `/etc/sudoers.d/90-phoebus-live` and validated
|
`live-sudoers`, installed to `/etc/sudoers.d/90-phoebus-live` and validated
|
||||||
with `visudo` at build time. The password-authenticated recovery console is
|
with `visudo` at build time. The password-authenticated recovery console is
|
||||||
deliberate and preserved.
|
deliberate and preserved.
|
||||||
- The `phoebus-dwl` session remains selectable as a fallback.
|
|
||||||
|
|
||||||
## NVIDIA accelerated graphics
|
## NVIDIA accelerated graphics
|
||||||
|
|
||||||
|
|
@ -162,6 +161,6 @@ UEFI VM: `gui` (welcome + wizard journey and screenshots), `install`
|
||||||
|
|
||||||
## Installed system
|
## Installed system
|
||||||
|
|
||||||
An installed system always authenticates through `greetd` and defaults to the
|
An installed system always authenticates through `greetd` and starts the
|
||||||
Mango session, with dwl selectable. Automatic login is **live-only** and is
|
Mango + DarkMaterial session. Automatic login is **live-only** and is
|
||||||
never copied to the installed system; see ADR 0009.
|
never copied to the installed system; see ADR 0009.
|
||||||
|
|
|
||||||
|
|
@ -99,10 +99,9 @@ echo "releases OK"
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
say "emit shared desktop assets"
|
say "emit shared desktop assets"
|
||||||
assets=(
|
assets=(
|
||||||
session-mango session-dwl assistant install welcome menu lock idle
|
session-mango assistant install welcome
|
||||||
mango-config mango-session-target install-desktop
|
mango-config mango-session-target install-desktop
|
||||||
wayland-session-mango wayland-session-dwl
|
wayland-session-mango greetd-live live-sudoers
|
||||||
waybar-config waybar-style greetd-live live-sudoers
|
|
||||||
brand-emblem brand-wordmark brand-wallpaper brand-tokens
|
brand-emblem brand-wordmark brand-wallpaper brand-tokens
|
||||||
nvidia-load nvidia-service gpu-report
|
nvidia-load nvidia-service gpu-report
|
||||||
)
|
)
|
||||||
|
|
@ -239,20 +238,14 @@ install_asset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_asset session-mango /usr/local/bin/phoebus-session-mango 0755
|
install_asset session-mango /usr/local/bin/phoebus-session-mango 0755
|
||||||
install_asset session-dwl /usr/local/bin/phoebus-session 0755
|
ln -sf phoebus-session-mango "$rootfs/usr/local/bin/phoebus-session"
|
||||||
install_asset assistant /usr/local/bin/phoebus-assistant 0755
|
install_asset assistant /usr/local/bin/phoebus-assistant 0755
|
||||||
install_asset install /usr/local/bin/phoebus-install 0755
|
install_asset install /usr/local/bin/phoebus-install 0755
|
||||||
install_asset welcome /usr/local/bin/phoebus-welcome 0755
|
install_asset welcome /usr/local/bin/phoebus-welcome 0755
|
||||||
install_asset menu /usr/local/bin/phoebus-menu 0755
|
|
||||||
install_asset lock /usr/local/bin/phoebus-lock 0755
|
|
||||||
install_asset idle /usr/local/bin/phoebus-idle 0755
|
|
||||||
install_asset mango-config /etc/xdg/mango/config.conf
|
install_asset mango-config /etc/xdg/mango/config.conf
|
||||||
install_asset mango-session-target /usr/lib/systemd/user/mango-session.target
|
install_asset mango-session-target /usr/lib/systemd/user/mango-session.target
|
||||||
install_asset install-desktop /usr/share/applications/phoebus-install.desktop
|
install_asset install-desktop /usr/share/applications/phoebus-install.desktop
|
||||||
install_asset wayland-session-mango /usr/share/wayland-sessions/phoebus-mango.desktop
|
install_asset wayland-session-mango /usr/share/wayland-sessions/phoebus-mango.desktop
|
||||||
install_asset wayland-session-dwl /usr/share/wayland-sessions/phoebus-dwl.desktop
|
|
||||||
install_asset waybar-config /etc/xdg/waybar/config
|
|
||||||
install_asset waybar-style /etc/xdg/waybar/style.css
|
|
||||||
# Live-only automatic login (never copied to an installed system).
|
# Live-only automatic login (never copied to an installed system).
|
||||||
install_asset greetd-live /etc/greetd/config.toml
|
install_asset greetd-live /etc/greetd/config.toml
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ KEEP_KERNELS='3'
|
||||||
PACKAGE_POLICY='balanced'
|
PACKAGE_POLICY='balanced'
|
||||||
FEATURES_BINPKG='yes'
|
FEATURES_BINPKG='yes'
|
||||||
|
|
||||||
# mango = default desktop (Mango + DankMaterialShell + dwl fallback);
|
# mango = canonical desktop (Mango + DarkMaterial);
|
||||||
# none/dwl/minimal/full override it. Omitting the key selects mango.
|
# none overrides it. Omitting the key selects mango.
|
||||||
DESKTOP_PROFILE='mango'
|
DESKTOP_PROFILE='mango'
|
||||||
FLATPAK='yes'
|
FLATPAK='yes'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue