Replace pkgsrc and mdevd with mouse ports desktop base

This commit is contained in:
Michal S.
2026-08-06 10:26:36 +01:00
parent c9dae15bc4
commit 6a8be734f3
97 changed files with 3129 additions and 810 deletions
+38 -17
View File
@@ -1,7 +1,7 @@
# MOUSE
MOUSE is the **Monolithic Opinionated Unix-like System Environment**: a small
Linux system with a versioned base, pkgsrc for third-party software, and
Linux system with a versioned base, mouse-ports for third-party software, and
`cheesed` as PID 1.
## Build
@@ -15,22 +15,32 @@ make run
make check
```
Artifacts and downloaded sources are kept in `build/`. The default builder has
The guest defaults to the host architecture, so Apple Silicon builds AArch64.
Set `MOUSE_ARCH=x86_64` or `MOUSE_ARCH=aarch64` to override it. An explicit
`MOUSE_BUILDER_PLATFORM` supplies the default architecture only when
`MOUSE_ARCH` is unset, so `MOUSE_ARCH=x86_64 MOUSE_BUILDER_PLATFORM=linux/arm64`
cross-builds an x86_64 guest on the Arm builder. Architecture-specific artifacts
live under `build/x86_64/` and `build/aarch64/`; downloaded sources are shared
under `build/sources/`.
The default builder has
8 CPUs, 8 GB of memory, and 8 build jobs; override those with
`MOUSE_BUILDER_CPUS`, `MOUSE_BUILDER_MEMORY`, and `MOUSE_BUILD_JOBS`.
`MOUSE_NETWORK=0 make run` disables QEMU networking.
`MOUSE_NETWORK=0 make run` disables QEMU networking. `MOUSE_GRAPHICAL=1 make
run` opens QEMU's graphical display while retaining the serial console in the
terminal.
Development images contain `root` and `toor`, both with the password
`cheddar`. `root` uses `/bin/sh` for emergency administration; `toor` uses
`/bin/tcsh` for ordinary administration. Change both passwords before exposing
an image to a network.
VM images use the hostname `mousehole` and provide the administrator account
`mouse` with the password `cheddar`. The account is a member of `wheel` and can
elevate through `doas`; direct `root` and `toor` password authentication remains
locked.
## System
The base owns `/bin`, `/sbin`, `/usr/bin`, and `/usr/sbin`; pkgsrc owns
The base owns `/bin`, `/sbin`, `/usr/bin`, and `/usr/sbin`; mouse-ports owns
`/usr/local`. `/var`, `/home`, `/srv`, and `/usr/local` are shared by both root
environments, `/etc` follows the selected root, and `/run` is rebuilt at boot.
The fixed `/usr/local` package prefix keeps pkgsrc out of base-owned paths.
The fixed `/usr/local` package prefix keeps ports out of base-owned paths.
Limine boots the default or alternate root from the same disk.
`mouse-bootenv prepare` snapshots the running root into the inactive one;
@@ -47,6 +57,10 @@ Persistent service policy lives only in `/etc/rc.conf`:
```sh
enable_network=YES
enable_gardendevd=YES
enable_seatd=YES
enable_greetd=YES
enable_wpa_supplicant=NO
enable_cron=YES
enable_ntpd=YES
```
@@ -55,18 +69,25 @@ Assignments are exactly `enable_NAME=YES` or `enable_NAME=NO`; shell expansion,
includes, and other keys are invalid. `/sbin/service` controls the running
system without editing boot policy.
The x86_64 kernel includes common laptop and desktop storage, USB, input,
wired-network, Intel Wi-Fi, and Atheros Wi-Fi drivers. Images ship the complete
pinned linux-firmware collection. To configure Wi-Fi, write a mode-0600
`/etc/wpa_supplicant/wpa_supplicant.conf` with `wpa_passphrase`, set
`enable_wpa_supplicant=YES` in `/etc/rc.conf`, and reboot; gardendevd loads drivers
for devices present at boot or plugged in later.
## Packages
Images contain the pinned pkgsrc 2026Q2 tree in `/usr/local/src/pkgsrc`, with
`bmake` and the package tools under `/usr/local`. Packages use
`/usr/local/etc` for configuration, `/var/db/pkg` for records, and
`/var/cache/pkgsrc` for distfiles and binary packages. This state survives a
base rollback.
Images contain the MOUSE ports tree in `/usr/local/src/mouse-ports`, with
source-built `bmake` under `/usr/local`. Ports use `/usr/local/etc` for
configuration, `/var/db/mouse/packages` for installation records, and
`/var/cache/mouse/ports` for verified distfiles. This state survives a base
rollback.
## Checks
`make check` builds the assembled disk with test fixtures, then boots it under
QEMU. It covers BIOS and UEFI boot, both Btrfs roots, services and cgroup
cleanup, users, networking, storage tools, native C and C++ compilation, pkgsrc
installation, and persistence across reboots. The build also rejects changed
QEMU. It covers UEFI boot on both architectures and BIOS on x86_64, both Btrfs roots, services and cgroup
cleanup, users, networking, storage tools, native C and C++ compilation, ports
layout, and persistence across reboots. The build also rejects changed
source checksums and dynamic base executables.