Casky

Export your Mac to nix-darwin or Ansible

If you manage Macs as code, Casky gives you a starting point: save what's on a Mac as a setup, then export it as a nix-darwin flake or an Ansible playbook.

Export

Choose File › Save This Mac as Setup, add what else the setup should cover (services, editor extensions, packages, dotfiles, Mac settings), then choose Export nix-darwin Flake or Export Ansible Playbook. You can also export a Brewfile.

nix-darwin

The flake uses nix-darwin's homebrew module for formulae, casks and App Store apps, with start_service for services, and system.defaults for Mac settings.

homebrew = {
  enable = true;
  brews = [
    "git"
    { name = "postgresql@17"; start_service = true; }
  ];
  casks = [ "ghostty" ];
  masApps = { "Xcode" = 497799835; };
};

Apply it on a Mac with Nix and Homebrew:

sudo nix run nix-darwin -- switch --flake .#casky     # the first time
sudo darwin-rebuild switch --flake .#casky            # after that

Anything nix-darwin has no setting for is listed at the top of the file, so you know what Casky's own Apply does that the flake doesn't.

Ansible

The playbook uses the community.general collection: homebrew_tap, homebrew, homebrew_cask, mas, homebrew_services, npm, pipx, cargo and osx_defaults.

ansible-galaxy collection install community.general
ansible-playbook setup.yml

No lock-in

Exports work on their own, without Casky. Keep using Casky to browse, update and compare, or stop whenever you like.

Download Casky for Mac

Needs macOS 26 or later. No account.