Skip to content

A declarative system approach to my macOS system

License

Notifications You must be signed in to change notification settings

shivangswain/nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Configuration for macOS

Declarative macOS system configuration using nix-darwin and home-manager.

Overview

This flake manages:

  • System packages via nixpkgs and Homebrew
  • GUI applications via Homebrew Casks
  • Mac App Store apps via mas
  • macOS system preferences (Dock, Finder, keyboard, etc.)
  • User environment (shell, Git, VS Code, GPG, etc.)

Prerequisites

Installing Nix

The recommended way to install Nix on macOS is using the Determinate Systems Nix Installer:

curl -fsSL https://install.determinate.systems/nix | sh -s -- install --prefer-upstream-nix

This installer:

  • Enables flakes and the unified CLI by default
  • Stores a receipt for easy uninstallation
  • Works seamlessly with nix-darwin

Usage

Update flake inputs and apply the configuration:

nix flake update --flake ~/.config/nix

sudo darwin-rebuild switch --flake ~/.config/nix#macos

Structure

~/.config/nix/
├── flake.nix                  # Flake definition and inputs
├── darwinConfigurations/
│   └── macos.nix              # System-level configuration
└── homeConfigurations/
    └── shivangswain.nix       # User-level configuration

License

This project is licensed under the MIT License. See LICENSE for details.

About

A declarative system approach to my macOS system

Topics

Resources

License

Stars

Watchers

Forks

Languages