feat/hybrid-darwin-support #14

Closed
onlyhavecans wants to merge 4 commits from feat/hybrid-darwin-support into main
Owner
No description provided.
Refactor module structure to support both NixOS and nix-darwin systems:

Architecture Changes:
- Reorganize modules into shared/, nixos/, and darwin/ directories
- shared/: Cross-platform modules (CLI tools, development)
- nixos/: NixOS-specific modules (system, desktop, gaming, etc.)
- darwin/: Darwin-specific modules (placeholders for future macOS hosts)

Profile Updates:
- Update profiles to conditionally import platform-specific modules
- Use isLinux/isDarwin flags in specialArgs for clean platform detection
- Avoid circular dependencies by passing platform flags from builders

Flake Changes:
- Add nix-darwin input following nixpkgs
- Add mkDarwinSystem builder parallel to mkNixosSystem
- Refactor pkgs creation to support multiple architectures
- Add platform-detection flags (isLinux, isDarwin) to specialArgs
- Update description to reflect cross-platform support

Testing & Validation:
- Update deadnix configuration to ignore underscore-prefixed bindings
- All existing NixOS configurations verified working
- Ready to add Darwin hosts when needed

Documentation:
- Update CLAUDE.md with new hybrid architecture
- Document platform-specific vs shared modules
- Add examples for future Darwin host configurations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Extend flake outputs to support all three target architectures:

Package Updates:
- x86_64-linux: All packages (git-xargs, cinc-workstation)
- x86_64-darwin: Cross-platform packages only (git-xargs)
- aarch64-darwin: Cross-platform packages only (git-xargs)
- cinc-workstation remains Linux-only (depends on .deb package)

Development Environment:
- Add devShells for x86_64-darwin and aarch64-darwin
- Shell environment now works on all three Mac systems
- Enables development on macOS with full tooling

Formatter Support:
- Add nixfmt-rfc-style formatter for both Darwin architectures
- Ensures consistent formatting across all platforms
- Enables `nix fmt` on macOS systems

This ensures developers can use `nix develop`, `nix fmt`, and
`nix build .#git-xargs` on all platforms (Linux and macOS).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
refactor: optimize flake with helper functions to reduce duplication
Some checks failed
CI/CD Pipeline / Flake Validation (pull_request) Successful in 14s
CI/CD Pipeline / Format Check (pull_request) Failing after 30s
471e62e7ca
Simplify flake.nix by introducing helper functions:

Helper Functions Added:
- forAllSystems: Generate outputs for all supported architectures
- mkSpecialArgs: Unified specialArgs creation for both NixOS and Darwin

Improvements:
- Reduced flake.nix from 180 to 165 lines (-15 lines)
- Eliminated duplicate code for devShells (3 → 1 declaration)
- Eliminated duplicate code for formatters (3 → 1 declaration)
- Unified specialArgs creation between NixOS and Darwin builders
- Single source of truth for supported systems (allSystems)

Package Handling:
- Smart platform filtering: Linux gets all packages, Darwin only cross-platform
- Cleaner, more maintainable package definitions
- Easy to add new cross-platform packages in the future

Benefits:
- Easier to add new platforms (just add to allSystems array)
- Less error-prone (single implementation for each concept)
- Maintains all existing functionality with zero behavior changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
lint
All checks were successful
CI/CD Pipeline / Format Check (pull_request) Successful in 7m4s
CI/CD Pipeline / Flake Validation (pull_request) Successful in 15s
0d07276fc3
onlyhavecans closed this pull request 2025-10-09 15:56:57 -07:00
onlyhavecans deleted branch feat/hybrid-darwin-support 2025-10-09 15:57:02 -07:00
All checks were successful
CI/CD Pipeline / Format Check (pull_request) Successful in 7m4s
CI/CD Pipeline / Flake Validation (pull_request) Successful in 15s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ops/nixos-skwrls!14
No description provided.