| 1 | # Configuration applied to all of clover's machines |
| 2 | { |
| 3 | lib, |
| 4 | pkgs, |
| 5 | user, |
| 6 | ... |
| 7 | }: |
| 8 | let |
| 9 | agentsFile = "/Users/${user.username}/config/users/clover/agents/AGENTS.md"; |
| 10 | claudeCodeDir = "/Library/Application Support/ClaudeCode"; |
| 11 | in |
| 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 | "amphetamine" |
| 31 | "magnet" |
| 32 | "runcat" |
| 33 | ]; |
| 34 | }; |
| 35 | |
| 36 | homebrew = { |
| 37 | enable = true; |
| 38 | casks = [ |
| 39 | "alt-tab" |
| 40 | "chatgpt" |
| 41 | "claude" |
| 42 | "db-browser-for-sqlite" |
| 43 | "firefox" |
| 44 | "ghostty" |
| 45 | "google-chrome" |
| 46 | "linear" |
| 47 | "raycast" |
| 48 | "signal" |
| 49 | "slack" |
| 50 | ]; |
| 51 | }; |
| 52 | |
| 53 | # system preferences |
| 54 | system.defaults = { |
| 55 | NSGlobalDomain = { |
| 56 | KeyRepeat = 1; |
| 57 | InitialKeyRepeat = 10; |
| 58 | }; |
| 59 | dock = { |
| 60 | show-recents = false; |
| 61 | expose-group-apps = false; |
| 62 | }; |
| 63 | CustomUserPreferences = { |
| 64 | NSGlobalDomain = { |
| 65 | # TODO: how to change system accent color |
| 66 | AppleHighlightColor = "1.000000 0.874510 0.701961 Orange"; |
| 67 | |
| 68 | # control how the fn keys operate |
| 69 | # 0 = default to media keys, 1 = default to FN1-12 |
| 70 | "com.apple.keyboard.fnState" = 0; |
| 71 | |
| 72 | NSUserKeyEquivalents = { |
| 73 | Minimize = "@~^\\Uf70f"; # set minimize to a stupidly hard key to press |
| 74 | }; |
| 75 | }; |
| 76 | }; |
| 77 | }; |
| 78 | } |