Skip to content

leminh0796/duke-nixies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

duke-nixies

A portable NixOS live ISO with Duke's dev environment: the niri Wayland compositor running DankMaterialShell, ghostty, zsh (oh-my-zsh + powerlevel10k), tmux, LazyVim, lazygit, tailscale, mise, bun and more. It boots straight to the desktop and can also install itself to a disk.

What's inside

Area Provided by
Compositor / shell niri + DankMaterialShell (cava, cliphist, wl-clipboard, dgop, dsearch, matugen, qt6-multimedia, wtype, khal)
Terminal ghostty + foot (VM-friendly software-rendered fallback); Catppuccin Mocha theme
Shell zsh + oh-my-zsh + powerlevel10k; plugins: git, autosuggestions, syntax-highlighting, fast-syntax-highlighting, autocomplete, aws-vault
Editor neovim + LazyVim starter
Dev lazygit, lazydocker, tmux, tailscale, docker, mise (node + ruby latest), bun, direnv, eza/bat/fzf/zoxide/ripgrep/fd
Browser Brave (Wayland/Ozone)

User: duke / password duke (passwordless sudo). Change it after install.

Build (host needs only Docker — no Nix)

./build-iso.sh           # aarch64 → ./duke-nixos-aarch64-linux.iso  (native on Apple Silicon)
./build-iso.sh x86_64    # x86_64  → ./duke-nixos-x86_64-linux.iso   (emulated build, slower)

The build runs in a nixos/nix container; a duke-nix docker volume caches the Nix store between runs.

Run in a VM

UTM (recommended on Apple Silicon)

  1. UTM → Create a New VM → Virtualize → Linux.
  2. Boot ISO Image: select duke-nixos-aarch64-linux.iso.
  3. Memory 4096 MB+, CPU 4 cores; add a 40 GB+ drive only if you plan to install to disk.
  4. After creating, open Settings → Display and choose a virtio-gpu (GL) card — niri is a Wayland compositor and needs a GPU/DRM device.
  5. Boot. greetd auto-logs duke into niri + DankMaterialShell.

Use UTM's QEMU backend (not Apple Virtualization) so virtio-gpu GL and clipboard sharing work; the Apple backend's GPU is too limited for niri.

To persist changes, run the NixOS installer from the live session onto the VM's disk, then detach the ISO.

QEMU CLI (alternative)

./run-vm.sh              # boots ./duke-nixos-aarch64-linux.iso live (HVF, virtio-gpu)
./run-vm.sh path/to.iso  # or a specific image

run-vm.sh also creates a 40 GB qcow2 disk (install onto it for a persistent VM) and uses Homebrew QEMU's UEFI firmware.

Rebuild / customize on the running system

The live system has flakes enabled. Clone this repo (or copy it in) and:

sudo nixos-rebuild switch --flake .#iso-aarch64-linux   # or iso-x86_64-linux

Keybinds (niri + DMS)

Mod = Super. Defined declaratively in config/niri.kdl (edit + rebuild to change):

Keys Action
Mod+Space or Mod+D App launcher (DMS spotlight)
Mod+Return / Mod+T Terminal (foot)
Mod+B Brave
Super+Alt+V / Super+Alt+N / Super+Alt+Comma Clipboard / notifications / settings
Super+Alt+L Lock
Mod+Q / Mod+F / Mod+Shift+F Close / maximize / fullscreen
Mod+H J K L, Mod+19 Focus windows / workspaces
Print Screenshot (DMS editor)
Mod+Shift+E Quit niri

Note

In UTM, macOS intercepts ⌘+Space (Spotlight), so it won't reach the guest — use Mod+D for the launcher, or click the launcher button on the DMS bar. The Mac ⌘ key maps to Super in the guest. The default terminal bind is foot because ghostty needs working OpenGL (flaky in a VM). ghostty is still installed for GPU-capable hosts.

First boot (offline-safe) → then provision

First boot works fully offline: the terminal, shell, prompt and fonts all render with no network. Language runtimes and editor plugins are installed later, once you have internet access:

  1. Boot, open a terminal (Mod+Return → foot) and confirm glyphs render.
  2. Connect to a network (Wi-Fi, ethernet, or a VPN such as Tailscale).
  3. Run the provisioning script (shipped in your home dir):
    ~/initial_set_up.sh
    It installs mise's global node + ruby, bootstraps LazyVim plugins, and refreshes the font cache. Safe to re-run.

Set your git identity once: git config --global user.name/user.email.

Layout

flake.nix            inputs + both arch targets (iso-x86_64-linux / iso-aarch64-linux)
modules/iso.nix      live-ISO + VM-guest tweaks, latest kernel
modules/users.nix    duke user, zsh login shell, sudo, greetd autologin
modules/desktop.nix  niri, DankMaterialShell, dsearch, greetd, pipewire, fonts, Brave
modules/dev.nix      tailscale, docker, lazygit, bun, build toolchain
home/                Home Manager: zsh, tmux, ghostty, foot, niri, nvim, mise, git, direnv, provision (initial_set_up.sh)
config/p10k.zsh      powerlevel10k prompt preset
config/niri.kdl      niri keybinds + DMS launcher/terminal integration
build-iso.sh         Docker-based ISO builder
run-vm.sh            QEMU launcher for Apple Silicon

About

A portable NixOS with my dev environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors