Go to file
2022-09-19 16:34:33 +02:00
emacs@24c8052f0e Update emacs 2022-09-18 22:59:09 +02:00
modules Refactoring 2022-09-19 16:34:33 +02:00
patches Initial commit 2022-09-18 18:30:24 +02:00
.gitmodules Initial commit 2022-09-18 18:30:24 +02:00
flake.lock Initial commit 2022-09-18 18:30:24 +02:00
flake.nix Refactoring 2022-09-19 16:34:33 +02:00
README.org Initial commit 2022-09-18 18:30:24 +02:00

My macOS config

This repo contains a declarative specification of the setup of my mac, using Nix, with nix-darwin and Nix Flakes. The initial setup is mimicked after shaunsingh's setup. Homebrew is installed for its cask support (i.e. mac apps lacking a Nix derivation).

Steps to install

  1. Install Nix for macOS

    sh <(curl -L https://nixos.org/nix/install)
  2. Install Homebrew

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Clone this repo (assuming there is no ~/.config on the system already)

    git clone --recurse-submodules https://github.com/larstvei/dotfiles.git ~/.config

    Note that the --recurse-submodules pulls down my Emacs configuration, which is not necessary for the setup to work.

  4. Build the setup from flake.nix

    cd ~/.config/
    nix build .#darwinConfigurations.larstvei-macbookpro.system --extra-experimental-features nix-command --extra-experimental-features flakes
    ./result/sw/bin/darwin-rebuild switch --flake .#larstvei-macbookpro

Maintaining

After making changes, I run the following command (from the ~/.config directory):

darwin-rebuild switch --flake .#larstvei-macbookpro