4 releases
Uses new Rust 2024
| 0.2.2 | Jan 29, 2026 |
|---|---|
| 0.1.2 | Jan 28, 2026 |
| 0.1.1 | Jan 28, 2026 |
| 0.1.0 | Jan 27, 2026 |
#1893 in Command line utilities
14KB
245 lines
nix-snake ❄️🐍
A lightweight, terminal-based Snake game and screensaver written in Rust.

Watch a NixOS Lambda (λ) navigate your terminal, consuming snowflakes and packages in an infinite loop, or take control and play yourself.
Status: Active Development 🚧
✨ Features
-
🖥️ Screensaver Mode (Autopilot): The snake plays itself using a greedy pathfinding algorithm. Perfect for a terminal background.
-
🎮 Seamless Override: Press any arrow key to instantly switch from "Screensaver" to "Manual" mode. Press a to switch back.
-
❄️ NixOS Themed: The snake head is a Lambda (λ), eating snowflakes (❄) and packages (📦).
-
🚀 Performance: Built with pure crossterm for low-latency rendering and minimal resource usage.
-
🔄 Infinity Walls: The world wraps around the edges of your terminal.
📦 Installation From Source
Ensure you have Rust and Cargo installed.
git clone https://github.com/saylesss88/nix-snake cd nix-snake
cargo install --path .
crates.io
cargo install nix-snake
Nix:
nix run github:saylesss88/nix-snake
# If it gives you problems try:
nix run --no-write-lock-file github:saylesss88/nix-snake
🕹️ Controls
-
a: Switch to Autopilot (Screensaver) Mode -
q/Esc: Quit -
Arrow keys: Start playing
-
The speed gets faster with every package/snowflake eaten
-
The screen flashes red on death & auto-restarts with a body length of 3
Dependencies
~3.5–8MB
~171K SLoC