aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 8f418514ea26c659d4b1155cf36157e8904fa67b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# dotfiles

My Development Setup, managed with [Nix](https://nixos.org), [nix-darwin](https://github.com/LnL7/nix-darwin), and [home-manager](https://github.com/nix-community/home-manager). Works on macOS and Linux.

## Quickstart

### 1. Install Nix

```shell
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
```

### 2. Clone the repository

```shell
git clone git@github.com:simenandre/dotfiles.git ~/dotfiles
cd ~/dotfiles
git submodule update --init --recursive
```

### 3. Apply the configuration

#### macOS

On first run, bootstrap nix-darwin:

```shell
nix run nix-darwin -- switch --flake .#default
```

On subsequent runs:

```shell
darwin-rebuild switch --flake .#default
```

#### Linux

Install [home-manager](https://github.com/nix-community/home-manager) as a standalone tool and apply the configuration:

```shell
# x86_64 (most common)
home-manager switch --flake .#simenandre

# aarch64 (ARM64, e.g. Raspberry Pi or ARM cloud instances)
home-manager switch --flake .#simenandre@aarch64-linux
```

## Structure

```
flake.nix               # Entry point – nix-darwin (macOS) + home-manager (macOS & Linux)
modules/
  darwin/
    default.nix         # System-level configuration (nix settings, core packages)
    homebrew.nix        # Homebrew packages (taps, brews, casks, Mac App Store)
    macos.nix           # macOS system defaults (replaces macos/macos script)
  home/
    default.nix         # home-manager entry point (platform-aware home directory)
    git.nix             # Git configuration (platform-aware SSH signing path)
    zsh.nix             # Zsh configuration files
    starship.nix        # Starship prompt configuration
    tmux.nix            # Tmux configuration
    ghostty.nix         # Ghostty terminal configuration
apps/
  Brewfile              # Legacy Brewfile (superseded by modules/darwin/homebrew.nix)
macos/
  macos                 # Legacy macOS defaults script (superseded by modules/darwin/macos.nix)
```