🌍 Read this in other languages: English | Bahasa Indonesia
A complete NixOS system configuration managed with Nix Flakes and Home Manager. Built for a hybrid Intel/NVIDIA laptop running Hyprland as the window manager, with full Caelestia integration for wallpaper-driven dynamic theming.
This is not a generic template. Understand the following before copying or adapting this repo:
- Hardware-specific: The NVIDIA Prime config in
configuration.nixusesintelBusId = "PCI:0:2:0"andnvidiaBusId = "PCI:1:0:0"— values specific to my machine. These will almost certainly be different on yours. Using them without adjustment may cause boot failure or a black screen. - Username-specific: Everything (paths, users, groups, aliases) is hardcoded to the username
andyh. Replace all occurrences across all.nixfiles before applying. - NixOS unstable: This flake tracks
nixos-unstable. Package behavior may change at any time. - Back up your data before running
nixos-rebuild.
| Component | Details |
|---|---|
| Window Manager | Hyprland (Wayland), session managed via UWSM |
| Display Manager | SDDM with sddm-astronaut-theme (pixel_sakura_static variant) |
| Terminal | Kitty with dynamic theming via kitty-wrapper.sh |
| Shell | Bash with aliases for NixOS management |
| Prompt | Starship with Catppuccin preset |
| Dynamic Theming | Caelestia Shell & CLI — terminal colors auto-sync from active wallpaper |
| GTK Theme | Graphite-Dark |
| Icon Theme | Tela-circle-dark |
| Cursor | Bibata-Modern-Ice |
| File Manager | Thunar (managed in configuration.nix) |
| Hardware | NVIDIA Prime Offload mode + Intel iGPU, Bluetooth, PipeWire |
| Virtualization | VirtualBox + libvirtd (QEMU/KVM) + GNS3 |
.
├── flake.nix # Flake entry point — defines all inputs and system outputs
├── flake.lock # Pinned dependency versions
├── configuration.nix # Main system config (boot, hardware, services, drivers)
├── hardware-configuration.nix # Hardware scan result — DO NOT copy directly
├── home.nix # User config via Home Manager (packages, dotfiles, aliases)
├── starship-catppuccin.toml # Starship prompt config (Catppuccin theme)
└── config/
└── hypr/
├── hyprland.conf # Main Hyprland configuration
└── scripts/
└── kitty-wrapper.sh # Kitty launcher with dynamic color injection
Beyond nixpkgs and home-manager, this flake pulls in:
- Helium Browser — an alternative browser installed via its own flake.
- caelestia-shell & caelestia-cli — the tooling behind wallpaper-based dynamic theming.
Assumes a clean NixOS installation with internet access.
Make sure experimental features are enabled in /etc/nixos/configuration.nix:
nix.settings.experimental-features = [ "nix-command" "flakes" ];Then run sudo nixos-rebuild switch once to apply.
git clone https://github.com/YOUR_USERNAME/nixos-config.git ~/nixos-config
cd ~/nixos-configThis step is mandatory. Copy the hardware config from your own machine:
cp /etc/nixos/hardware-configuration.nix ~/nixos-config/Then open configuration.nix and update the intelBusId and nvidiaBusId values based on your lspci output:
lspci | grep -E "VGA|3D"How to read the Bus ID from the output:
00:02.0 VGA compatible controller: Intel ... → PCI:0:2:0
01:00.0 3D controller: NVIDIA ... → PCI:1:0:0
Find and replace all instances of andyh with your username in:
flake.nix→home-manager.users.andyhconfiguration.nix→users.users.andyh, paths inshellAliaseshome.nix→home.username,home.homeDirectory
cd ~/nixos-config
sudo nixos-rebuild switch --flake .#nixosThe theming pipeline runs automatically every time a terminal is opened:
- Caelestia reads the currently active wallpaper and generates a 16-color palette from it.
kitty-wrapper.shruns instead of callingkittydirectly. It callscaelestia wallpaper -pto fetch the color palette as JSON, parses it withjq, and writes the result to~/.cache/caelestia/colors-kitty.conf.- Kitty opens with those freshly written colors via an
includedirective in its config (home.nix).
Note: The symlink between
config/hypr/in this repo and~/.config/hypr/is created automatically by Home Manager via thexdg.configFileoption inhome.nix.
Defined in home.nix, available immediately after activation:
| Alias | Full Command | Description |
|---|---|---|
rebuild |
sudo nixos-rebuild switch --flake ~/nixos-config#nixos |
Full system rebuild and activation |
rebuild-fast |
sudo nixos-rebuild switch --fast ... |
Faster rebuild (skips some checks) |
rebuild-build |
sudo nixos-rebuild build ... |
Build only, no activation |
rollback |
sudo nixos-rebuild switch --rollback |
Roll back to the previous generation |
gens |
sudo nix-env --list-generations ... |
List all system generations |
update |
nix flake update && rebuild |
Update all flake inputs then rebuild |
nix-clean |
sudo nix-collect-garbage -d && ... |
Delete old generations and optimize store |
edit-nix |
nano ~/nixos-config/configuration.nix |
Edit system config |
edit-flake |
nano ~/nixos-config/flake.nix |
Edit flake |
edit-home |
nano ~/nixos-config/home.nix |
Edit Home Manager config |
edit-hypr |
nano ~/nixos-config/config/hypr/hyprland.conf |
Edit Hyprland config |
nixfast |
nix shell nixpkgs# |
Spawn a temporary shell with a nixpkgs package |
system.stateVersionandhome.stateVersionare set to"25.11". Do not change these unless you know exactly what they mean — they mark the NixOS version at first install, not a version to keep updating.home.activation.removeBackups: Home Manager is configured to automatically delete*.backupfiles (created during symlink conflicts) once activation completes.- NoiseTorch runs as a systemd user service (
noisetorch-mic) that auto-loads at the start of a graphical session, with a 5-second delay to ensure PipeWire is ready. - The
hardware-configuration.nixin this repo belongs to my machine. It is included for structural reference only — do not use it directly. - Disk UUIDs in
hardware-configuration.nix: This file contains partition UUIDs specific to my disk (/and/boot). These values are harmless to publish, but they are meaningless on any other machine. Always regenerate this file on your own system withnixos-generate-configrather than copying mine.