A secure, modern and customizable Wayland session locker for compositors implementing ext-session-lock-v1.
nilock targets compositors that expose ext-session-lock-v1 and keeps the
runtime conservative: lock, render, authenticate through PAM, unlock.
For the complete install and security notes, see docs/install.md and docs/security.md.
Nilock was born after attempting to modernize swaylock-effects for compositors
using ext-session-lock-v1. Instead of continuing to patch an aging codebase,
the project was rewritten from scratch in Rust with a focus on security, modern
Wayland protocols, and maintainability.
- Secure
ext-session-lock-v1 - PAM authentication
- Multi-monitor rendering
- Per-output rendering
- Screenshot background capture
- Wallpaper mode
- Blur + vignette effects
- Fade transitions
- Clock and date
- Embedded Inter font
- TOML configuration
- Built-in presets
- Secure by default
- Native Wayland
- Small dependency surface
- Modern renderer
- Easy packaging
Preferred when available:
# install the nilock package from your distro or repositorymake build
sudo make installFor packaging and PAM installation details, see docs/install.md.
nilock --clock --screenshotsUseful commands:
nilock --help
nilock --dump-default-config
nilock --self-checkFull CLI reference: docs/cli.md
Configuration is loaded automatically from:
~/.config/nilock/config.toml
Config precedence:
defaults < config.toml < --preset < CLI flags
Example:
color = "11111b"
clock = true
time_format = "%H:%M"
date_format = "%A, %d/%m/%Y"
messages = true
idle_text = "Enter password"
verifying_text = "Verifying..."
wrong_text = "Wrong password"
success_text = "Unlocking..."
indicator = true
inside_color = "1e1e2e"
ring_color = "89b4fa"
text_color = "cdd6f4"
wrong_color = "f38ba8"
verifying_color = "f9e2af"
screenshots = true
wallpaper = "/home/caue/Pictures/wallpaper.png"
effect_blur = "7x5"
effect_vignette = "0.5:0.5"
effect_fade = 250
effect_unlock_fade = 180
indicator_animation_speed = 1.0
indicator_animation_intensity = 1.0
indicator_style = "classic"
clock_layout = "classic"
indicator_ring = true
ignore_empty = trueWayland
│
▼
Session Lock
│
▼
Output Manager
│
▼
Renderer
│
▼
PAM Authentication
│
▼
Unlock
Lock
│
▼
Solid Background
│
▼
Screenshot / Wallpaper
│
▼
Blur
│
▼
Vignette
│
▼
Cache
│
▼
Fade
│
▼
UI
Clock and date use embedded Inter:
Inter SemiBoldfor the timeInter Regularfor the date, messages, and indicator text
Current release: v0.1.0-alpha
- Session locking
- PAM
- Multi-monitor
- Blur
- Wallpapers
- Config
- Presets
- Packaging
- GPU renderer
cargo build --releaseThis produces:
target/release/nilock
If you want to install it system-wide after building:
sudo make installThe nilock source code is licensed under the MIT License. Copyright (c) 2026 Cauê Araujo.
Nilock embeds the Inter typeface under the SIL Open Font License 1.1. See LICENSE and LICENSES/OFL.txt.
