feat: replace moongreet with regreet, moonlock with swaylock
Update PKGBUILD version / update-pkgver (push) Successful in 4s

Greeter and lock screen move to the official repos. The greeter keeps
running inside its own niri instance, so niri-greeter.kdl only changes
which binary it spawns; regreet.toml and regreet.css return from f79128b^
with current theme and font names.

swaylock replaces moonlock in the stasis lid and lock_screen actions. Its
config is seeded to the user home, because swaylock never reads /etc/xdg
and the system-wide path does not work on NixOS.

moonlock stays installed: moonset invokes it by name and has no
lock_command option yet.
This commit is contained in:
2026-08-14 14:21:13 +02:00
parent 070a9065be
commit a17474f52d
12 changed files with 148 additions and 35 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ Reproducible Arch Linux setup based on archinstall + post-install automation.
- `config/` — archinstall configuration (incl. custom-commands that clone the repo to /opt/moonarch, root-owned)
- `scripts/` — post-install and helper scripts
- `packages/` — package lists (official + AUR), maintained separately
- `defaults/` — XDG configs, shell config, helper binaries, systemd services, udev rules, greetd/moongreet config, wallpaper
- `defaults/` — XDG configs, shell config, helper binaries, systemd services, udev rules, greetd/regreet config, swaylock config, wallpaper
## Battery Conservation Mode
+7
View File
@@ -1,5 +1,12 @@
# Decisions
## 2026-08-14 Greeter and lock screen move to upstream packages: regreet + swaylock
- **Who**: Dominik, ClaudeCode
- **Why**: moongreet (4372 lines of Rust) and moonlock (2386) were self-maintained for a login screen and a lock screen — a cost Dominik no longer wants to carry. moonlock additionally sits on an unfixed unlock SIGSEGV that is a GTK 4.22 regression in gtk4-layer-shell, not our code (`moonlock/DECISIONS.md` 2026-07-08), so the toolkit switch removes a defect we cannot fix ourselves. Both replacements come from `extra`: `greetd-regreet` and `swaylock`. greetd stays.
- **Tradeoffs**: (1) **Greeter** — ReGreet's UI is fixed in Rust (relm4 templates, power buttons are `set_label: "Reboot"`/`"Power Off"`, English, no icon), so `extraCss`/CSS can restyle but not restructure. SDDM was the alternative: its QML theme is freely editable and `catppuccin-sddm` ships avatars and a clock ready-made, but it drops greetd, needs a second compositor for the greeter (weston kiosk or kwin_wayland), and nixpkgs still calls its Wayland path experimental. Chose the smaller diff over the freer layout. dms-greeter (Quickshell) was rejected as the youngest option, pulling the whole DankMaterialShell. (2) **Lock screen** — hyprlock covers moonlock's feature list declaratively, fingerprint included, and runs on niri (no `hyprland-*` protocol in its build), at the price of three hyprwm libraries on the version cadence of Hyprland. swaylock has exactly one protocol (`ext-session-lock-v1`), no GL, no D-Bus, and comes from the sway project — but no blur, no avatar, no fingerprint, just a ring on the wallpaper. Dominik picked the thing least likely to break. Fingerprint was no loss: `fprintd` is in no package list and was never deployed. (3) **Greeter host** — ReGreet is normally started under cage; the existing niri wrapper was kept instead, because `niri-greeter.kdl` carries `layout "de"`, `numlock`, `Sweet-cursors` and an empty `binds {}`. Under cage the layout would come from `XKB_DEFAULT_LAYOUT`, which nothing sets, so the greeter would come up US — a password with `y`/`z` in it would simply fail. (4) **swaylock config location** — swaylock searches `~/.swaylock/config`, `$XDG_CONFIG_HOME/swaylock/config` and `SYSCONFDIR/swaylock/config`, never `/etc/xdg/`. It is therefore seeded into the user home like `stasis.rune`, which also keeps the file valid on NixOS, where nixpkgs leaves meson's `sysconfdir` at `$out/etc` and a system-wide `/etc/swaylock/config` is never read.
- **How**: `defaults/etc/greetd/niri-greeter.kdl` spawns `regreet` instead of `moongreet`, retry loop unchanged. New `defaults/etc/greetd/regreet.toml` and `regreet.css` — both recovered from `f79128b^`, where they had been deleted when moongreet arrived, with the theme names updated to Colloid-Grey-Dark-Catppuccin / Colloid-Grey-Catppuccin-Dark and the font to UbuntuSans Nerd Font. `defaults/etc/moongreet/` deleted. New `defaults/xdg/swaylock/config` with the Catppuccin Mocha palette (ring lavender, verifying blue, wrong red, cleared yellow); `-f` stays with the callers rather than in the file. `defaults/xdg/stasis/stasis.rune` now calls `swaylock -f` for `lid_close_action` and both `lock_screen` plans. `packages/official.txt` gained `greetd-regreet` and `swaylock`; `moonarch-doctor` checks the two regreet files instead of `moongreet.toml`; `post-install.sh` seeds the swaylock config next to the stasis one.
- **Remaining exception**: `moonlock` stays installed. `moonset/src/power.rs` invokes it by name and has no `lock_command` option, so its Lock action would otherwise die. Idle and lid-close already go to swaylock, which means two lockers coexist until moonset is released with that call changed.
## 2026-08-10 Clipboard history moves from walker to a quickshell popout
- **Who**: Dominik, ClaudeCode
- **Why**: `Super+C` (`spawn "walker" "-s" "clipboard"`) was the last keybind still opening walker; every other menu had already become a quickshell popout, and moonix had dropped walker entirely. Requirements set with it: entries deletable from the picker, history must not survive a session, images shown as images if possible.
+16 -14
View File
@@ -13,10 +13,10 @@ desktop that can be rebuilt from scratch in minutes.
| Component | Choice | Why |
|-----------|--------|-----|
| **Compositor** | [Niri](https://github.com/YaLTeR/niri) | Scrollable tiling — no fixed grid, infinite horizontal workspace. Purpose-built Wayland compositor, not an X11 port. |
| **Greeter** | [greetd](https://sr.ht/~kennylevinsen/greetd/) + [moongreet](https://gitea.moonarch.de/nevaforget/moongreet) | Minimal, Wayland-native login. moongreet provides GTK4 UI with fingerprint support, running inside its own Niri instance. |
| **Lock Screen** | [moonlock](https://gitea.moonarch.de/nevaforget/moonlock) | ext-session-lock-v1 protocol — compositor guarantees lock on crash. PAM + fprintd, GPU blur, multi-monitor. |
| **Greeter** | [greetd](https://sr.ht/~kennylevinsen/greetd/) + [ReGreet](https://github.com/rharish101/ReGreet) | Minimal, Wayland-native login. ReGreet is a GTK4 greeter from the official repos, running inside its own Niri instance and inheriting the system GTK theme. |
| **Lock Screen** | [swaylock](https://github.com/swaywm/swaylock) | ext-session-lock-v1 protocol — compositor guarantees lock on crash. PAM authentication, one Wayland protocol, no toolkit. |
| **Power Menu** | [moonset](https://gitea.moonarch.de/nevaforget/moonset) | GTK4 Layer Shell overlay above Waybar. Lock, logout, hibernate, reboot, shutdown with confirmation. |
| **Idle Manager** | [stasis](https://aur.archlinux.org/packages/stasis) + [wayland-pipewire-idle-inhibit](https://github.com/rafaelrc7/wayland-pipewire-idle-inhibit) | Separate AC/battery power plans. Brightness dimming, DPMS, lock (via moonlock), and suspend on configurable timeouts. The companion inhibitor holds a Wayland idle-inhibitor while audio plays — keeps the screen awake during windowed browser video, which stasis' pactl detection skips by design. |
| **Idle Manager** | [stasis](https://aur.archlinux.org/packages/stasis) + [wayland-pipewire-idle-inhibit](https://github.com/rafaelrc7/wayland-pipewire-idle-inhibit) | Separate AC/battery power plans. Brightness dimming, DPMS, lock (via swaylock), and suspend on configurable timeouts. The companion inhibitor holds a Wayland idle-inhibitor while audio plays — keeps the screen awake during windowed browser video, which stasis' pactl detection skips by design. |
| **Bar** | [Waybar](https://github.com/Alexays/Waybar) | Wayland-native, highly customizable. Niri workspace/window modules via community plugins. |
| **Launcher** | [Walker](https://github.com/abenz1267/walker) + [Elephant](https://github.com/abenz1267/elephant) | Wayland-native GTK4 launcher with built-in providers for apps, bluetooth, audio, files, and calculator. Dmenu mode for custom scripts (VPN, CPU governor). |
| **Terminal** | [Foot](https://codeberg.org/dnkl/foot) | Fast, minimal Wayland-native terminal. Server mode for instant window spawning. |
@@ -32,7 +32,7 @@ desktop that can be rebuilt from scratch in minutes.
| **Wallpaper** | [waypaper](https://github.com/anufrievroman/waypaper) + [awww](https://codeberg.org/LGFae/awww) | waypaper provides GUI selection, awww handles animated transitions (60 FPS, 2s crossfade). |
| **Night Light** | [wlsunset](https://sr.ht/~kennylevinsen/wlsunset/) | Wayland-native blue light filter via wlr-gamma-control. Toggleable from Waybar brightness group. |
| **Firewall** | UFW | Simple deny-incoming/allow-outgoing default. Sane baseline without iptables complexity. |
| **AUR Helper** | [paru](https://github.com/Morganamilo/paru) | Rust-based, pacman-compatible. Supports custom PKGBUILD repos for moongreet/moonlock/moonset. |
| **AUR Helper** | [paru](https://github.com/Morganamilo/paru) | Rust-based, pacman-compatible. Supports custom PKGBUILD repos for moonset and the moonarch package itself. |
## Quick Start
@@ -123,8 +123,7 @@ defaults/
moonarch-camera-boot Switch all cameras off (run at boot by moonarch-camera.service)
shell/zshrc Zsh config: prompt, aliases, FZF, completion
etc/greetd/ greetd daemon + greeter Niri config
etc/moongreet/ moongreet configuration
etc/greetd/ greetd daemon, greeter Niri config, regreet config + CSS
etc/systemd/user/ Systemd user services (cliphist, kanshi, walker, nautilus)
etc/systemd/system/ System services (battery conservation restore, camera switch-off on boot)
backgrounds/wallpaper.jpg Default wallpaper (shared by desktop, greeter, lock screen)
@@ -133,7 +132,7 @@ defaults/
## Startup Sequence
```
greetd ─► niri (greeter instance) ─► moongreet ─► user authenticates
greetd ─► niri (greeter instance) ─► regreet ─► user authenticates
niri (user session)
@@ -193,7 +192,7 @@ are part of the system and updated via `paru -Syu`.
| Service | Purpose |
|---------|---------|
| greetd | Login greeter (runs moongreet inside Niri) |
| greetd | Login greeter (runs regreet inside Niri) |
| NetworkManager | Network management (WiFi, VPN, Ethernet) |
| bluetooth | Bluetooth stack (bluez) |
| systemd-timesyncd | NTP time synchronization |
@@ -213,15 +212,18 @@ are part of the system and updated via `paru -Syu`.
## Moonarch Ecosystem
Moonarch is the deployment and configuration layer. Three companion projects provide
the Wayland session UI — all built with Rust + gtk4-rs and sharing Catppuccin Mocha
theming:
Moonarch is the deployment and configuration layer. One companion project provides
session UI that has no upstream equivalent, built with Rust + gtk4-rs and sharing
Catppuccin Mocha theming:
| Project | Role | Installed via |
|---------|------|---------------|
| [moongreet](https://gitea.moonarch.de/nevaforget/moongreet) | greetd greeter (GTK4 Layer Shell, fingerprint, i18n) | `paru -S moongreet-git` |
| [moonlock](https://gitea.moonarch.de/nevaforget/moonlock) | Wayland lock screen (ext-session-lock-v1, PAM, fprintd) | `paru -S moonlock-git` |
| [moonset](https://gitea.moonarch.de/nevaforget/moonset) | Power menu overlay (GTK4 Layer Shell) | `paru -S moonset-git` |
| [moonset](https://gitea.moonarch.de/nevaforget/moonset) | Power menu overlay (GTK4 Layer Shell) | `paru -S moonset` |
Greeter and lock screen used to be own projects too (moongreet, moonlock) and were
replaced by ReGreet and swaylock from the official repos. `moonlock` stays installed
for now: moonset's Lock action still invokes it by name. It goes away with the moonset
release that points that action at swaylock.
These are built from a [custom paru package repository](https://gitea.moonarch.de/nevaforget/moonarch-pkgbuilds)
added during post-install.
+4 -4
View File
@@ -1,4 +1,4 @@
// ABOUTME: Niri configuration for the Moongreet login greeter.
// ABOUTME: Niri configuration for the regreet login greeter.
// ABOUTME: Started by greetd — minimal config without keybinds for security.
input {
@@ -41,9 +41,9 @@ environment {
"GTK_USE_PORTAL" "0"
}
// Start moongreet and quit niri once moongreet exits.
// Retry loop ensures niri shuts down even on early moongreet crashes.
spawn-sh-at-startup "moongreet; while ! niri msg action quit --skip-confirmation 2>/dev/null; do sleep 0.5; done"
// Start regreet and quit niri once regreet exits.
// Retry loop ensures niri shuts down even on early regreet crashes.
spawn-sh-at-startup "regreet; while ! niri msg action quit --skip-confirmation 2>/dev/null; do sleep 0.5; done"
// Maximize greeter window
window-rule {
+40
View File
@@ -0,0 +1,40 @@
/* ABOUTME: Catppuccin Mocha CSS overrides for regreet. */
/* ABOUTME: Extends the system GTK theme with greeter specific styling. */
window {
background-color: #1e1e2e;
}
entry {
border-radius: 8px;
padding: 8px 12px;
border: 1px solid #45475a;
background-color: #313244;
color: #cdd6f4;
}
entry:focus {
border-color: #b4befe;
}
button {
border-radius: 8px;
padding: 8px 16px;
background-color: #313244;
color: #cdd6f4;
border: 1px solid #45475a;
}
button:hover {
background-color: #45475a;
}
button.suggested-action {
background-color: #b4befe;
color: #1e1e2e;
border: none;
}
button.suggested-action:hover {
background-color: #89b4fa;
}
+17
View File
@@ -0,0 +1,17 @@
# ABOUTME: regreet configuration for Moonarch.
# ABOUTME: Appearance of the login greeter; the GTK theme is the system one.
[background]
path = "/usr/share/moonarch/wallpaper.jpg"
fit = "Cover"
[GTK]
application_prefer_dark_theme = true
cursor_theme_name = "Sweet-cursors"
font_name = "UbuntuSans Nerd Font 12"
icon_theme_name = "Colloid-Grey-Catppuccin-Dark"
theme_name = "Colloid-Grey-Dark-Catppuccin"
[commands]
reboot = ["systemctl", "reboot"]
poweroff = ["systemctl", "poweroff"]
-11
View File
@@ -1,11 +0,0 @@
# ABOUTME: Moongreet configuration for Moonarch.
# ABOUTME: Defines appearance and behavior of the login greeter.
[appearance]
background = "/usr/share/moonarch/wallpaper.jpg"
cursor-theme = "Sweet-cursors"
cursor-size = 24
[behavior]
# show_user_list = true
# default_session = "niri-session"
+4 -4
View File
@@ -2,7 +2,7 @@
# Manages screen dimming, DPMS, lock, and suspend timers
@author "Moonarch"
@description "Idle management for Moonarch (Niri + moonlock)"
@description "Idle management for Moonarch (Niri + swaylock)"
default:
# monitor_media: detect active media via PipeWire/PulseAudio sink-inputs
@@ -31,7 +31,7 @@ default:
]
# Lid actions (laptop only)
lid_close_action "moonlock"
lid_close_action "swaylock -f"
lid_open_action ""
# AC power plan (relaxed)
@@ -49,7 +49,7 @@ default:
lock_screen:
timeout 180
command "moonlock"
command "swaylock -f"
end
suspend:
@@ -73,7 +73,7 @@ default:
lock_screen:
timeout 60
command "moonlock"
command "swaylock -f"
end
suspend:
+45
View File
@@ -0,0 +1,45 @@
# ABOUTME: Moonarch default swaylock configuration, Catppuccin Mocha.
# ABOUTME: Seeded to ~/.config/swaylock/config; callers pass -f themselves.
#
# Each line is turned into a --long-option by swaylock, so key=value applies.
# Colors are rrggbb[aa] without a leading '#'.
image=/usr/share/moonarch/wallpaper.jpg
scaling=fill
font=UbuntuSans Nerd Font
font-size=20
indicator-radius=100
indicator-thickness=8
indicator-caps-lock
show-failed-attempts
# Ring: lavender idle, blue while verifying, red on failure, yellow when cleared
ring-color=b4befe
ring-ver-color=89b4fa
ring-wrong-color=f38ba8
ring-clear-color=f9e2af
ring-caps-lock-color=f9e2af
# Inside of the ring: base with alpha, so the wallpaper stays visible
inside-color=1e1e2ecc
inside-ver-color=1e1e2ecc
inside-wrong-color=1e1e2ecc
inside-clear-color=1e1e2ecc
# Keypress feedback
key-hl-color=a6e3a1
bs-hl-color=f38ba8
caps-lock-key-hl-color=a6e3a1
caps-lock-bs-hl-color=f38ba8
text-color=cdd6f4
text-ver-color=cdd6f4
text-wrong-color=f38ba8
text-clear-color=cdd6f4
text-caps-lock-color=f9e2af
# No separate outline; the ring carries the state color
line-color=00000000
separator-color=00000000
+2
View File
@@ -71,6 +71,8 @@ awww
brightnessctl
nwg-look
greetd
greetd-regreet
swaylock
polkit-gnome
# File Manager / XDG
+2 -1
View File
@@ -214,7 +214,8 @@ check_config_match "/etc/xdg/swaync/config.json" "$SRC/swaync/config.json"
check_config_match "/etc/xdg/swaync/style.css" "$SRC/swaync/style.css"
check_config_match "/etc/greetd/config.toml" "$SRC/greetd/config.toml"
check_config_match "/etc/greetd/niri-greeter.kdl" "$SRC/greetd/niri-greeter.kdl"
check_config_match "/etc/moongreet/moongreet.toml" "$SRC/moongreet/moongreet.toml"
check_config_match "/etc/greetd/regreet.toml" "$SRC/greetd/regreet.toml"
check_config_match "/etc/greetd/regreet.css" "$SRC/greetd/regreet.css"
# --- 5. Helper Scripts ---
+10
View File
@@ -128,6 +128,16 @@ if [[ ! -f "$HOME/.config/stasis/stasis.rune" && -f /etc/xdg/stasis/stasis.rune
install -Dm644 /etc/xdg/stasis/stasis.rune "$HOME/.config/stasis/stasis.rune"
fi
# --- Seed swaylock user config ---
#
# swaylock searches ~/.swaylock/config, $XDG_CONFIG_HOME/swaylock/config and
# SYSCONFDIR/swaylock/config, but never /etc/xdg/. Seed Moonarch's template to
# the user home. Never overwrite an existing user config.
if [[ ! -f "$HOME/.config/swaylock/config" && -f /etc/xdg/swaylock/config ]]; then
log "Seeding Moonarch swaylock config to user home."
install -Dm644 /etc/xdg/swaylock/config "$HOME/.config/swaylock/config"
fi
# --- Enable systemd user services ---
log "Enabling systemd user services..."