This repository provides a unified Nix flake for managing both macOS (via nix-darwin) and NixOS configurations. It enables reproducible, declarative system setups for both platforms from a single source of truth.
- Single Flake for Multiple Systems: Manage both macOS and NixOS hosts from one repository
- macOS Support: Uses
nix-darwinfor system configuration with Homebrew integration - NixOS with ZFS: Configured with ZFS root and dataset provisioning using
disko - Modular Design: Clean separation between host-specific and shared modules
- Secrets Management: Integration with sops-nix for secure secrets handling
- Sane Deployment: Integration with deploy-rs for secure secrets handling
- Nix Utilities: Includes formatting tools and nix-index for better developer experience
.
├── flake.nix # Flake entrypoint: inputs, outputs, host configs
├── hosts/ # Host-specific configurations
│ ├── darwin/ # macOS configurations
│ └── chopper/ # NixOS configuration for "chopper" host
├── modules/ # Shared NixOS modules
│ ├── arr.nix # Arr stack configuration
│ ├── conduit.nix # Conduit Matrix homeserver
│ ├── esp.nix # ESP-related tools
│ ├── nextcloud.nix # Nextcloud server configuration
│ └── zfs.nix # ZFS configuration and utilities
├── overlays/ # Nixpkgs overlays
├── packages/ # Custom packages
│ ├── chopper/ # Packages specific to chopper
│ ├── darwin/ # Packages specific to macOS
│ └── default.nix # Package definitions
└── scripts/ # Helper scripts
nh darwin switch <PATH>nh os switch <PATH>- Add new host configurations under
hosts/<hostname>/ - Reference new hosts in
flake.nixunder the appropriate section - Create reusable modules in the
modules/directory - Add custom packages in the
packages/directory
# Update flake inputs
nix flake update
# Check system generation history
nix profile history --profile /nix/var/nix/profiles/system
# Format nix files
nix fmt
# Search packages
nix search nixpkgs <package-name>
# Start a dev shell
nix developSee LICENSE for details.