NixOS for ClockworkPi uConsole.
Download the latest release from GitHub Releases.
- CM4:
nixos-uconsole-cm4-*.img.zst - CM5:
nixos-uconsole-cm5-*.img.zst(experimental)
# Decompress (replace cm4 with cm5 if needed)
zstd -d nixos-uconsole-cm4-*.img.zst
# Flash to SD card (replace sdX with your device)
sudo dd if=nixos-uconsole-cm4-*.img of=/dev/sdX bs=4M status=progress
syncAfter flashing, expand the root partition:
sudo parted /dev/sdX resizepart 2 100%
sudo resize2fs /dev/sdX2- Insert SD card into the uConsole and power on
- Login as
rootwith passwordchangeme(will be changed on first login) - Connect to WiFi:
nmtui - Wait a few seconds for time sync (the RPi has no hardware clock, so HTTPS may fail until NTP syncs)
Create a flake for your uConsole:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-uconsole.url = "github:nixos-uconsole/nixos-uconsole";
};
outputs = { nixos-uconsole, ... }: {
nixosConfigurations.my-uconsole = nixos-uconsole.lib.mkUConsoleSystem {
variant = "cm4"; # or "cm5"
modules = [ ./configuration.nix ];
};
};
}Then rebuild (from the flake directory, or use the full path):
sudo nixos-rebuild switch --flake /path/to/flake#my-uconsoleThe base image provides:
- NetworkManager - Auto-starts, use
nmtuito connect - SSH - Auto-starts, connect remotely
- Mosh - Mobile shell for flaky connections
- Bluetooth - Use
bluetuithTUI to pair devices - Graphics - Mesa GPU drivers enabled
- Power button - Short press sleeps, long press shuts down
- Console font - Sized for the 5" display
Default packages: vim, nano, btop, bluetuith, curl, wget, git, tmux, and more.
Pre-built packages (including the kernel) are provided via Cachix and configured automatically in the flake.
Note for nixpkgs-unstable users: Our cache is built with nixpkgs stable (25.11). If you override with
nixos-uconsole.inputs.nixpkgs.follows = "nixpkgs"pointing to unstable, cache hits won't work and you'll rebuild the kernel locally. Options:
- Don't use
follows- let nixos-uconsole use its pinned stable nixpkgs- Build on a more powerful machine with
--build-hostor--target-host- Be prepared to wait several hours for the kernel to build on the uConsole
# CM4
nix build github:nixos-uconsole/nixos-uconsole#minimal-cm4
# CM5 (no pre-built cache - builds kernel locally)
nix build github:nixos-uconsole/nixos-uconsole#minimal-cm5
# Flash
sudo dd if=result/sd-image/*.img of=/dev/sdX bs=4M status=progressNote: The
.#minimalalias is deprecated and will be removed in a future release. Use.#minimal-cm4explicitly.
Currently supported:
- ClockworkPi uConsole with CM4
- ClockworkPi uConsole with CM5 (experimental support)
The kernel includes patches for:
- CWU50 5" 720x1280 DSI display
- AXP228 power management
- OCP8178 backlight controller
- Audio routing
The uConsole hardware is configured via hardware.raspberry-pi.config options which generate the config.txt boot configuration. Module-specific settings are applied automatically based on whether you're using CM4 or CM5.
Override these in your configuration:
hardware.raspberry-pi.config.cm4."dt-overlays".clockworkpi-uconsole.params = {
nopcie0.enable = true; # Disable PCIe
nogenet.enable = true; # Disable built-in ethernet
no_sound_switch.enable = true; # Disable sound routing switch
energy_full_design_uwh.enable = true;
energy_full_design_uwh.value = "24790000"; # Battery capacity in uWh
charge_full_design_uah.enable = true;
charge_full_design_uah.value = "6700000"; # Battery capacity in uAh
};hardware.raspberry-pi.config.cm5."dt-overlays".clockworkpi-uconsole-cm5.params = {
no_rp1eth.enable = true; # Disable RP1 ethernet
no_sound_switch.enable = true; # Disable sound routing switch
energy_full_design_uwh.enable = true;
energy_full_design_uwh.value = "24790000"; # Battery capacity in uWh
charge_full_design_uah.enable = true;
charge_full_design_uah.value = "6700000"; # Battery capacity in uAh
};The default CM4 configuration includes overclocking for better performance. Override via:
hardware.raspberry-pi.config.cm4.options = {
arm_freq.value = "1800"; # CPU frequency in MHz
gpu_freq.value = "600"; # GPU frequency in MHz
over_voltage.value = "4"; # Voltage offset
force_turbo.value = "0"; # Disable always-on turbo
};Contributions welcome! Areas that need work:
- Desktop environment presets
- Documentation improvements
MIT
- ClockworkPi for the uConsole hardware
- robertjakub/oom-hardware for kernel patches, 4G module, and sleep support
- nvmd/nixos-raspberrypi for Raspberry Pi NixOS support
- ByteBakers for build infrastructure