# A macOS nix-darwin config This repository now focuses on macOS systems managed with nix-darwin. Started with a configuration generated from [this nixos config template](https://github.com/dustinlyons/nixos-config/)Installed nix with `--nix-build-group-id 30000` Initialy created 'with secrets' but stripped out the git/agenix in favor of sops Refactored the configuration to remove nixos but keep the shared modules and Darwin host setup, with no NixOS trees or Linux app targets. ## Emacs and binary caches The Emacs overlay is a flake input pinned in `flake.lock`. Keep the lock file in version control so builds use the same input revisions. Update only the overlay with: ```sh nix flake update emacs-overlay ``` Emacs uses the unmodified release package from each architecture's nixpkgs, rather than `emacs-git`, to reuse builds from `https://cache.nixos.org`. The overlay still supplies `emacsWithPackagesFromUsePackage` and the Lisp package definitions. The installed Emacs and launchd daemon share the same configured package; client launchers use the matching release Emacs client. Both the NixOS and nix-community caches are configured in the Darwin host. Cache availability depends on the locked revisions and architecture. Check the base Emacs build without compiling (substitute `x86_64-darwin` for Intel): ```sh nix build --dry-run '.#darwinConfigurations.aarch64-darwin.pkgs.emacs' ``` The custom Lisp package collection and wrapper may still need local builds.