Skip to content

sbenson09/macos-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

macOS Nix Configuration

This repository contains the configuration for Sean’s macOS system, built using nix-darwin and home-manager, fully modularized via Nix flakes.

It manages:

  • System-wide settings (defaults, packages, services)
  • Homebrew (via nix-darwin + nix-homebrew integration)
  • User environment (shell setup, dotfiles, tools) using Home Manager
  • Modular split across multiple focused .nix files

πŸ›‹οΈ Structure

.
β”œβ”€β”€ flake.nix                # Top-level flake defining inputs, outputs, and module imports
β”œβ”€β”€ flake.lock               # Locked dependencies (generated automatically)
β”œβ”€β”€ modules/                 # Modular system configuration
β”‚   β”œβ”€β”€ configuration.nix    # Basic system settings 
β”‚   β”œβ”€β”€ homebrew.nix         # Homebrew and nix-homebrew setup
β”‚   β”œβ”€β”€ system-defaults.nix  # macOS defaults 
β”‚   └── users.nix            # User account and Home Manager environment
β”œβ”€β”€ dotfiles/                # Linked dotfiles managed via Home Manager
β”‚   β”œβ”€β”€ zshrc
β”‚   β”œβ”€β”€ vimrc
β”‚   β”œβ”€β”€ p10k.zsh
β”‚   β”œβ”€β”€ gitconfig
β”‚   β”œβ”€β”€ kitty.conf
β”‚   └── vscode_settings.json

πŸš€ Usage

1. Install nix and nix-darwin

Follow the nix-darwin installation instructions:

sh <(curl -L https://nixos.org/nix/install)
nix run github:LnL7/nix-darwin

2. Clone this repository

git clone https://github.com/sbenson09/macos-nix.git
cd sbenson-macos-flake

3. Apply the system configuration

For personal computers:

darwin-rebuild switch --flake .#sbenson

For work computers:

darwin-rebuild switch --flake .#sbenson

πŸ”§ Updating dependencies

nix flake update

This updates flake.lock to the latest upstream revisions.

πŸ“ƒ Notes

  • Apps installed via Homebrew’s mas-cli may require manual App Store login.
  • macOS System extensions may require manual approval in macOS System Settings.
  • Certain apps and configurations are only applied to personal computers.
  • Different usernames anticipated for personal and work computers.