NixOS & Linux
Depth — shipping (on myself). My whole machine is a declarative config, open-sourced as haywan-nix: Hyprland, Gruvbox, zsh, one folder per machine.
Depth: shipping — on my own machine, every day. My laptop runs NixOS with Hyprland, defined as a flake I can rebuild from scratch. When something breaks, it breaks in a file I can read.
The whole thing is public: github.com/abdurahmon27/haywan-nix .
What that actually buys me
- The machine is reproducible. A new laptop is a
nixos-rebuild, not a weekend. - Rollbacks are real. A bad change is one generation back.
- Per-project shells:
shell.nixper repo, no global tool soup. (This portfolio has one.)
haywan-nix — the config, as a thing other people can use
Publishing a dotfiles repo is easy; publishing one somebody else can boot is not. Four decisions did most of that work:
- One folder per machine. Everything in
hosts/<name>/becomesnixosConfigurations.<name>automatically, so adding a machine is adding a directory — no editing a central list that grows into a mess. - Two files to edit.
default.nixfor the system (drivers, services),home.nixfor apps and dotfiles. Everything else is module internals the user never has to open. - Switches, not forks.
haywan.gaming.enable = true;instead of “copy my repo and delete the parts you don’t want”. If you have to fork a config to use it, it isn’t a config, it’s a screenshot. - Plain dotfiles. Hyprland, Kitty, Waybar and Rofi configs stay normal config
files in
dotfiles/instead of being generated from Nix attributes. Nix is a good package manager and a bad INI file.
./install.sh asks a few questions (hostname, GPU, which apps), writes
hosts/<hostname>/ and changes nothing on your system — the first
nixos-rebuild build is still yours to run. Home Manager keeps your old
~/.zshrc next to the new one as *.hm-bak, because the first time a tool
silently ate mine I stopped trusting tools that do that.
What’s in it: Hyprland with Waybar (top + a vertical right bar), Rofi, Kitty,
Dunst, swww wallpapers and tuigreet; Gruvbox Material everywhere (the same
palette as this site), JetBrains Mono Nerd Font; zsh with Powerlevel10k; NVIDIA /
AMD / Intel paths; PipeWire, Bluetooth, Tailscale; and the dev layer I actually
need — Docker, PostgreSQL, Redis, MongoDB, the Android SDK with an emulator, iOS
device tools and nix-ld for prebuilt binaries that expect a normal Linux.
The hardest thing I’ve done with it
Getting iOS development working without a Mac: xtool inside Docker,
usbmuxd on the host, a free Apple ID for signing, and GitHub’s macOS runners
for the parts that genuinely need Apple’s toolchain. NixOS made it harder in its
own special ways — no FHS, no casual curl | sh — and that’s exactly why the
final setup is something I can hand to someone else:
ios-on-nixos . The device side of
it — udev rules, usbmuxd, the Android SDK next to it — lives in
haywan-nix too.
Related: React Native, FilterCam.
Comfortable with
- Flakes, custom NixOS modules with their own options,
home-manager, overlays for the packages that need patching. - Hyprland + Wayland config, and the specific pain of screen sharing on it.
- Docker on NixOS, systemd units written as Nix attributes.
- Linux fundamentals: udev rules, journald, networking, permissions.
Still learning
- Writing derivations that aren’t just
mkShellwrappers. nixos-anywhere/ declarative remote deploys for servers, not just my laptop.- Keeping closure sizes sane instead of letting
/nix/storegrow forever.
comments