mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 23:14:57 +08:00
| .. | ||
| darwin-module.nix | ||
| nixos-module.nix | ||
| README.md | ||
| repos.nix | ||
| runner-pkgs.nix | ||
Self-Hosted CI on Macbook Pro
WARNING: WIP Notes. Expect final version in nixos.asia as a blog post.
Approach
While we could use the nix-darwin module for Github Runners, we do it the other way. First, create a aarch64-linux NixOS VM (I use Parallels Desktop) and do everything there. Then, setup distributed builds to have the VM do aarch64-darwin builds remotely on the host machine (the Macbook Pro). The former is done buy ./nixos-module.nix, while the latter is done by ./darwin-module.nix.
Facts
- I use 1Password (managed by colmena secrets) to store the GitHUb classic PAT.
- On macOS, go to Remote Login and allow SSH access for the
github-runneruser, or allow for all users; otherwise our Linux VM won't be able to remote build on the Mac.- The Linux VM's
/etc/ssh/ssh_host_ed25519_keyis used to authorize itself to connect to the Mac.
- The Linux VM's
- The author has observed the official "linux-builder" to be slow, in comparison to a Parallels VM. Prefer setting up a Parallels VM if you can.
Usage
/systems/darwin.nix(macOS config)/systems/github-runner.nix(NixOS Linux VM config)