A security-hardened, reproducible NixOS developer workstation.
Boot clean. Every time. Your data persists β everything else is rebuilt from code.
π Impermanence β Root filesystem wiped on every boot, eliminating config drift π‘οΈ Full-disk encryption β LUKS + LVM on Btrfs with encrypted hibernation π§± Hardened kernel β AppArmor enabled, firewall default deny-all π₯οΈ Niri compositor β Modern scrolling tiling Wayland desktop with Waybar π€ AI-ready β Claude Code, ChatGPT Codex & OpenCode CLI out of the box βοΈ Modular β Feature flags let you toggle dev tools, desktop, AI, and more
Everything is toggled in a single config.nix:
{
username = "yourname";
hostname = "nixos";
disk = "/dev/nvme0n1";
swapSize = "36G"; # >= RAM for hibernation
git = {
userName = "Your Name";
userEmail = "your@email.com";
};
features = {
development = true; # JetBrains, Docker, Rust, .NET, Node.js, Zed
desktop = true; # Niri, Waybar, VLC, OBS, LocalSend, browsers
vmwareGuest = false; # VMware guest additions
ai = {
claudeCode = true; # Anthropic Claude Code CLI
chatgptCodex = true; # OpenAI Codex CLI
openCode = true; # OpenCode CLI
};
};
}| Flag | What you get |
|---|---|
development |
JetBrains IDEs, Docker, Rust, .NET, Java, Node.js, Zed, lazygit |
desktop |
Niri, Waybar, Fuzzel, Mako, VLC, OBS, LocalSend, Zen, Helium |
vmwareGuest |
VMware Guest Additions |
ai.* |
Claude Code, ChatGPT Codex, OpenCode CLIs |
Headless server? Set all feature flags to
falseβ you get a minimal, encrypted, hardened server.
- UEFI system (no Legacy BIOS)
- NixOS Live USB (23.11+)
- β₯ 50 GB disk space
Boot the NixOS Live USB, connect to the internet, then run:
nix-shell -p git curl
curl -sL https://raw.githubusercontent.com/SaschaOnTour/NixOS/main/install.sh -o /tmp/install.sh
sudo bash /tmp/install.shThe installer guides you through everything β disk selection, configuration, encryption, and installation. No second screen needed.
Manual installation
# 1. Enable flakes
export NIX_CONFIG="experimental-features = nix-command flakes"
# 2. Clone & configure
git clone https://github.com/SaschaOnTour/NixOS.git /tmp/nixos-config
cd /tmp/nixos-config
nano config.nix
# 3. Partition & encrypt disk (β οΈ WIPES TARGET DISK)
sudo nix --experimental-features "nix-command flakes" run \
github:nix-community/disko -- --mode disko --flake .#hostname
# 4. Install NixOS
sudo nixos-install --flake .#hostname --no-root-passwd
# 5. Reboot & set password
reboot
passwd yournameπ New to NixOS? There's a detailed Beginner's Guide below covering every step from flashing the USB to your first desktop session.
The installer automatically clones the repo with your personal config.nix to ~/Projects/nixos-config. No manual setup needed.
Note: If the directory is missing for any reason, clone manually:
cd ~/Projects git clone https://github.com/SaschaOnTour/NixOS.git nixos-configThen edit
config.nixwith your values (username, hostname, etc.).
Important: The shell aliases
os-switchandos-updateexpect the config at~/Projects/nixos-config.
After editing your config or pulling updates:
os-switch # Apply changes (runs: nh os switch ~/Projects/nixos-config)No reboot needed β changes are applied immediately (except kernel updates). You can run os-switch from any directory.
os-update # Update flake inputs + rebuild (runs: nh os switch --update ~/Projects/nixos-config)If something breaks:
sudo nixos-rebuild switch --rollback.
βββ config.nix # β Your single config file
βββ style.nix # Theming (colors, fonts)
βββ flake.nix # Flake definition
βββ hosts/default/ # Host & disk configuration
βββ modules/
β βββ core/ # Boot, security, networking, impermanence
β βββ desktop/ # Niri, Greetd, Wayland tools, media apps
β βββ programs/ # Browsers, dev tools, AI tools, CLI utilities
β βββ optional/ # VMware
βββ users/default/ # User & Home Manager configuration
The root filesystem (/) is wiped on every reboot. Only explicitly declared paths survive:
Persisted system paths: /var/log, /var/lib/docker, /etc/NetworkManager/system-connections, and more.
Persisted user paths: ~/Projects, ~/Documents, ~/Downloads, ~/.ssh, browser profiles, IDE configs, build caches (~/.cargo, ~/.m2, ~/.nuget), AI tool configs (~/.claude, ~/.codex).
Everything is defined in modules/core/security.nix β add a path, run os-switch, done.
Niri is a scrolling tiling compositor β windows are arranged in columns that scroll horizontally like a filmstrip.
| Shortcut | Action |
|---|---|
Mod+Return |
Terminal (Ghostty) |
Mod+Space |
App launcher (Fuzzel) |
Mod+B |
Browser |
Mod+E |
Editor (Zed) |
Mod+Q |
Close window |
Mod+F |
Maximize |
Mod+Left/Right |
Navigate columns |
Mod+1β5 |
Switch workspace |
Mod+P |
Power menu |
Mod+Escape |
Lock screen |
CLI: eza, bat, fd, ripgrep, jq, yazi, btop, dust, zoxide, tldr, lazygit, lazydocker, gh, mc, micro
Browsers: Zen Browser, Helium, Tor Browser
Desktop: VLC, OBS Studio, mpv, imv, zathura, KeePassXC, LocalSend, FSearch, Ferdium, Thunderbird, Syncthing
Dev: JetBrains Rider/IntelliJ/RustRover, Zed, Docker, Rust, .NET, Java, Node.js
AI: Claude Code, ChatGPT Codex, OpenCode
Shell: Fish with pre-configured aliases, starship prompt, zoxide directory jumping
Click to expand the full step-by-step walkthrough
Go to nixos.org/download and grab the Minimal ISO (not GNOME/KDE β this config installs its own desktop).
sudo dd if=nixos-minimal-*.iso of=/dev/sdX bs=4M status=progress oflag=syncOr use Ventoy / Balena Etcher.
Boot from USB via UEFI menu (F2/F12/Del). For WiFi, run nmtui.
Verify: curl -sI https://nixos.org β if you see HTTP headers, you're connected.
nix-shell -p git curl
curl -sL https://raw.githubusercontent.com/SaschaOnTour/NixOS/main/install.sh -o /tmp/install.sh
sudo bash /tmp/install.shThe interactive installer walks you through disk selection, username, hostname, swap size, git config, and feature flags. It then partitions the disk, sets up encryption, and installs NixOS β all in one guided flow.
After installation, it prompts you to reboot. Log in with your username and initial password nixos, then change it:
change-passwordImportant: Use
change-passwordinstead ofpasswd. Due to impermanence (root wipe on reboot), regularpasswdchanges don't survive reboots.
- 512M EFI boot partition
- Encrypted LUKS container with LVM
- Swap partition (your configured size, for hibernation)
- Btrfs root with subvolumes
- EFI stub β LUKS password β Login screen β Niri desktop
- Log in with your username and initial password
nixosβ change it withchange-password - Press
Mod+Returnto open a terminal - Windows tile in scrollable columns β navigate with
Mod+Left/Right
[off-screen] β [Column A] [Column B] [Column C] β [off-screen]
^^^^^^^^ ^^^^^^^^
visible visible
Unlike i3/Sway, Niri doesn't squeeze all windows onto one screen. Columns extend infinitely left and right β you scroll through them.
| Task | How |
|---|---|
| Install a package | Add to a .nix file β os-switch |
| Change a keybinding | Edit users/default/home/niri.nix β os-switch |
| Persist a new directory | Edit modules/core/security.nix β os-switch |
| Rollback a broken change | sudo nixos-rebuild switch --rollback |
| Update everything | os-update |
| Alias | Description |
|---|---|
ll / la |
File listing (eza) |
cat |
Syntax-highlighted viewer (bat) |
find / grep |
Fast search (fd / ripgrep) |
g / dc |
Short for git / docker-compose |
.. / ... |
Navigate up |
os-switch |
Apply config changes (nh os switch ~/Projects/nixos-config) |
os-update |
Update + apply (nh os switch --update ~/Projects/nixos-config) |
z <path> |
Smart directory jump (zoxide) |
Issues and pull requests are welcome!