❄️ My personal Nix flake for fern & frieren.
README.md

❄️ Apothecary's Nix Config

This repository serves as the home to my Nix flake that declaratively configures my Apple Silicon MacBook running NixOS (frieren) and nix-darwin (fern).

The Setup #

  • frieren (NixOS on Asahi): niri (niri-bread), eww bar, mako, SwayOSD, greetd + tuigreet
  • fern (nix-darwin): Homebrew casks, macOS defaults

Shared Stack:

  • Terminal & Shell: Ghostty, Fish, Nushell, zellij
  • Editor: Helix
  • Apps: Helium, Yazi (files), MPD + rmpc (music), pass (secrets)
  • Aesthetics: Catppuccin Macchiato; Maple Mono NF CN, Adwaita Sans

Structure #

Built on flake-parts using the dendritic pattern (import-tree): every .nix file under modules/ is a flake-parts module, auto-discovered. Files starting with _ are skipped.

Each file is one feature and writes into whichever classes it needs (generic, shared by NixOS and nix-darwin; nixos; darwin; homeManager), under the role it belongs to:

  • base: every host (shell, editor, CLI tools, nix, ssh, secrets, theme)
  • desktop: GUI (niri and its bar/OSD/notifications on Linux, terminals, browser, fonts, media, chat)
  • gaming: launchers and games
  • dev: development tools (direnv, gh, nix tooling, AI tools)

Hosts are declared as configurations.<nixos|darwin>.<name> (modules/flake/configurations.nix), get base automatically, and import the other roles they want. A role's nixos/darwin aspect brings in its generic and homeManager halves (modules/flake/roles.nix). Home Manager config that only applies on one OS goes in that OS's aspect through home-manager.sharedModules.

Everything that makes Asahi behave like this MacBook's macOS lives in Silicon Bakery, a flake of its own that frieren imports as hardware.siliconBakery.

Daily Driving #

nh os switch       # NixOS
nh darwin switch   # macOS