1# Configuration applied to all of clover's machines
2{
3 lib,
4 pkgs,
5 user,
6 ...
7}:
8let
9 agentsFile = "/Users/${user.username}/config/users/clover/agents/AGENTS.md";
10 claudeCodeDir = "/Library/Application Support/ClaudeCode";
11in
12{
13 # packages for all machines
14 environment.systemPackages = with pkgs; [
15 git
16 ];
17
18 system.activationScripts.claudeCodeInstructions.text = ''
19 install -d -m 0755 ${lib.escapeShellArg claudeCodeDir}
20 ln -sfn ${lib.escapeShellArg agentsFile} ${lib.escapeShellArg "${claudeCodeDir}/CLAUDE.md"}
21 '';
22
23 services.tailscale.enable = true;
24
25 # configuration for shared modules.
26 # all custom options in 'shared' for clarity.
27 shared.darwin = {
28 macAppStoreApps = [
29 "adguard"
30 "magnet"
31 ];
32 };
33
34 homebrew = {
35 enable = true;
36 casks = [
37 "alt-tab"
38 "chatgpt"
39 "claude"
40 "db-browser-for-sqlite"
41 "firefox"
42 "ghostty"
43 "google-chrome"
44 "linear"
45 "raycast"
46 "signal"
47 "slack"
48 ];
49 };
50
51 # system preferences
52 system.defaults = {
53 NSGlobalDomain = {
54 KeyRepeat = 1;
55 InitialKeyRepeat = 10;
56 };
57 dock = {
58 show-recents = false;
59 expose-group-apps = false;
60 };
61 CustomUserPreferences = {
62 NSGlobalDomain = {
63 # TODO: how to change system accent color
64 AppleHighlightColor = "1.000000 0.874510 0.701961 Orange";
65
66 # control how the fn keys operate
67 # 0 = default to media keys, 1 = default to FN1-12
68 "com.apple.keyboard.fnState" = 0;
69
70 NSUserKeyEquivalents = {
71 Minimize = "@~^\\Uf70f"; # set minimize to a stupidly hard key to press
72 };
73 };
74 };
75 };
76}