Skip to content

Add aarch64-darwin packaging for nix-darwin users#13

Open
amatos wants to merge 6 commits into
zsa:mainfrom
amatos:add-aarch64-darwin-support-for-nix-flake
Open

Add aarch64-darwin packaging for nix-darwin users#13
amatos wants to merge 6 commits into
zsa:mainfrom
amatos:add-aarch64-darwin-support-for-nix-flake

Conversation

@amatos

@amatos amatos commented Jun 20, 2026

Copy link
Copy Markdown

Added packaging and documentation for aarch64-darwin (Requires M1+ processors) for nix-darwin users. All changes contained to README.md, and to files under nix/.

The module configuration was split into nix/module/darwin and nix/module/nixos to handle the slightly different system requirements: nixos' module registers with udev, and the darwin module does not. Entries that are common between both systems are left in nix/module/common.nix. A readme was created as nix/module/README.md with these details.

Instructions were added to the main README.md

amatos added 5 commits June 20, 2026 02:13
- Add aarch64-darwin to the systems list
- Exclude ../udev from the source fileset on Darwin
- Skip udev postInstall step on Darwin
- Guard services.udev.packages behind !stdenv.isDarwin in module.nix
- Add darwinModules.default for nix-darwin users
- Expand meta.platforms to include darwin
- Replace the single nix/module.nix with nix/module/common.nix holding shared options, plus nix/module/darwin and nix/module/nixos default.nix files for platform-specific config.
- The darwin module skips udev package installation, which is required for nixos.
- nix/package.nix's udev rule install checks for stdenv.isLinux to install the udev rule.

Signed-off-by: Alberth Matos <alberth@matos.cc>
Signed-off-by: Alberth Matos <alberth@matos.cc>
- README.md updated with details on nix-darwin support.
- nix/modules/README.md explains the usage of nix/module/darwin, nix/module/nixos, and nix/module/common.nix and how they interoperate.

Signed-off-by: Alberth Matos <alberth@matos.cc>
Signed-off-by: Alberth Matos <alberth@matos.cc>
@amatos amatos marked this pull request as ready for review June 20, 2026 07:42
Fix for ‘nix build’ warning: evaluation warning: 'system' has been renamed to/replaced by 'stdenv.hostPlatform.system'

Per https://discourse.nixos.org/t/how-to-fix-evaluation-warning-system-has-been-renamed-to-replaced-by-stdenv-hostplatform-system/72120, pkgs.system changed because the ‘system’ alias was dropped, so as to make it clearer which ‘system’ one is choosing (i.e. the local ‘system’)

Signed-off-by: Alberth Matos <alberth@matos.cc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant