Nix installer & manager on MacOS, with TCC supervisor daemon.
  • Rust 77.1%
  • Swift 11.2%
  • Shell 9.8%
  • Nix 1.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-08 06:34:11 +08:00
.cargo feat: establish branded SwiftUI and Rust application baseline 2026-11-03 03:36:46 +08:00
app fix: allow adopting mounted official Nix volumes 2026-11-06 21:03:04 +08:00
assets feat: establish branded SwiftUI and Rust application baseline 2026-11-03 03:36:46 +08:00
crates fix: resume restoration with matching build accounts 2026-11-08 01:28:11 +08:00
docs docs: verify partial account blocking and restoration 2026-11-08 06:29:49 +08:00
installer feat: clear retained installations and confirm fresh installation separately 2026-11-06 09:03:18 +08:00
modules feat: add retained installation restoration checks 2026-11-05 02:22:05 +08:00
nix feat: add retained installation restoration checks 2026-11-05 02:22:05 +08:00
patches feat: clear retained installations and confirm fresh installation separately 2026-11-06 09:03:18 +08:00
scripts fix: preserve bundled tool execution permissions on install 2026-11-03 14:31:44 +08:00
templates/default fix: fetch the default configuration from the public archive 2026-11-05 20:43:32 +08:00
tests feat: clear retained installations and confirm fresh installation separately 2026-11-06 09:03:18 +08:00
.envrc feat: establish branded SwiftUI and Rust application baseline 2026-11-03 03:36:46 +08:00
.gitignore docs: establish gjz010/nix-darwin construction plan and brand 2026-11-03 03:13:46 +08:00
AGENTS.md docs: keep authentication input and submission together 2026-11-05 21:38:22 +08:00
Cargo.lock feat: add read-only APFS inventory and operation plans 2026-11-03 04:07:24 +08:00
Cargo.toml feat: add read-only APFS inventory and operation plans 2026-11-03 04:07:24 +08:00
CONTEXT.md docs: establish gjz010/nix-darwin construction plan and brand 2026-11-03 03:13:46 +08:00
devenv.lock feat: establish branded SwiftUI and Rust application baseline 2026-11-03 03:36:46 +08:00
devenv.nix feat: establish branded SwiftUI and Rust application baseline 2026-11-03 03:36:46 +08:00
devenv.yaml feat: establish branded SwiftUI and Rust application baseline 2026-11-03 03:36:46 +08:00
flake.lock feat: integrate managed deployment gates and dual launchd artifacts 2026-11-03 04:34:51 +08:00
flake.nix fix: initialize run when synthetic configuration is absent 2026-11-05 22:36:22 +08:00
README.md docs: align project overview with verified capabilities 2026-11-08 06:34:11 +08:00

gjz010/nix-darwin 图标

gjz010/nix-darwin

Apple Silicon · macOS 15+ · SwiftUI + Rust

状态:原生 App 实机验收阶段。

已在隔离 macOS 环境验证 APFS 卷准备、安装、显式接管、受管部署、保留数据卸载 与恢复。当前继续验证权限归属和中断恢复等生命周期场景;具体证据与后续项目见 macOS 验收和施工计划。

这是什么

gjz010/nix-darwin 是面向 Apple Silicon、macOS 15 及以上的 Nix 存储卷与受管 安装管理工具。产品提供两个独立生命周期:准备承载 /nix 的 APFS 卷,以及 合并 Nix 运行时与 nix-darwin 配置的受管安装。

管理界面提供状态查看、操作计划、确认与系统授权,Rust supervisor 承载受管服务。 项目采用源码自行构建方式。

本项目不是 Nix、NixOS 或 nix-darwin 的官方发行版。上游名称只用于说明兼容关系 与组件来源。

文档

源码布局

app/                    SwiftUI 管理界面、Core 模块、fixture 测试与 Probe CLI
crates/supervisor/      Rust 固定角色 supervisor
crates/volume-manager/  卷准备与安装生命周期管理
modules/nix-darwin.nix  services.gjz010-nix-darwin 模块
modules/tests/          最小求值 fixture
scripts/                构建、检查、安装与挂载脚本
assets/nix-darwin.icns  由用户维护的 icon.svg 派生
Cargo.toml/.cargo/      Rust workspace 与构建目录配置
devenv.nix/devenv.yaml  Rust 工具链开发环境
docs/                   设计、品牌、迁移与原型局限

固定品牌:App 文件 gjz010-nix-darwin.app,Bundle ID io.github.gjz010.nix-darwin,helper nix-darwin-supervisor,support 目录 /Library/Application Support/gjz010-nix-darwin,模块 services.gjz010-nix-darwin。

构建与检查

前置条件:macOS 15 及以上、Apple Silicon、Xcode 命令行工具、Rust 工具链与 Nix/devenv。先进入固定开发环境:

direnv allow
devenv shell

在 macOS 上运行阶段 1 检查:

scripts/check.sh

它组织已有的 Rust fmt/clippy/test、Swift 单元测试、最小模块求值与合并 App 构建。只构建到 .harness/,不安装、不加载服务、不修改 TCC 或生产 /nix。

Linux 只能完成 cargo fmt --check 和 Nix 模块求值;supervisor 使用 Darwin 专有的 libc ABI,Linux 上的 cargo clippy/cargo test 会按预期报缺少 Darwin 符号,不能作为通过证据。

单独构建 App:

scripts/build.sh

输出为 .harness/build/gjz010-nix-darwin.app,只做本地 ad-hoc 签名。构建脚本 不会把它写入 /Applications,也不会加载 launchd 作业。

边界

  • 不声称当前仓库已经部署,也不声称已有生产安装可以直接迁移。
  • 破坏性实验只在独立新卷或隔离 Mac 环境进行,不直接对唯一生产 /nix 试删。
  • 旧 support 目录不会被静默移动;迁移必须显式确认并保留回退来源。
  • 机器秘密、原始日志、构建产物和 .harness/ 不进入版本库。
  • 检查与证据只记录实际执行过的内容;未执行项标为未测。