-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
269 lines (244 loc) · 6.64 KB
/
flake.nix
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
{
description = "Krishnaswamy's nix-darwin system flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
ghostty.url = "github:ghostty-org/ghostty";
};
outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew, ghostty }:
let
username = "subramk";
configuration = { pkgs, config, ... }: {
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.shells = [
pkgs.fish
"/opt/homebrew/bin/fish"
];
environment.systemPackages =
[
pkgs.alacritty
pkgs.any-nix-shell
pkgs.aria2
pkgs.bat
pkgs.bruno
pkgs.bruno-cli
pkgs.cocoapods
pkgs.colima
pkgs.coreutils
pkgs.cosign
pkgs.ctags
pkgs.devbox
pkgs.direnv
pkgs.dnsmasq
pkgs.docker
pkgs.docker-compose
pkgs.dua
pkgs.eza
pkgs.fabric-ai
pkgs.fd
pkgs.fish
pkgs.fpp
pkgs.fzf
pkgs.gh
pkgs.git
pkgs.gitsign
pkgs.glow
pkgs.gnupg
pkgs.go_1_23
pkgs.golint
pkgs.gopls
pkgs.goreleaser
pkgs.graphviz
pkgs.heroku
pkgs.htop
pkgs.httpie
pkgs.iina
pkgs.ipcalc
pkgs.jc
pkgs.jdk8
pkgs.jq
pkgs.jump
pkgs.keychain
pkgs.kube3d
pkgs.kubectl
pkgs.kubectx
pkgs.kubernetes-helm
pkgs.lazydocker
pkgs.lazygit
pkgs.lima
pkgs.lorri
pkgs.lunarvim
pkgs.mkcert
pkgs.neovim
pkgs.nssTools
pkgs.ollama
pkgs.openssh
pkgs.pet
pkgs.pika
pkgs.pinentry-curses
pkgs.pinentry_mac
pkgs.ripgrep
pkgs.rustup
pkgs.shell-gpt
pkgs.shfmt
pkgs.silver-searcher
pkgs.skim
pkgs.sops
pkgs.starship
pkgs.stern
pkgs.terraform-ls
pkgs.terraform-lsp
pkgs.tig
pkgs.tldr
pkgs.television
pkgs.tmux
pkgs.tmuxp
pkgs.tree
pkgs.vim
pkgs.vscode
pkgs.watch
pkgs.wget
pkgs.yazi
pkgs.yubikey-manager
pkgs.yubikey-personalization
pkgs.zellij
];
fonts.packages = [
pkgs.nerd-fonts.caskaydia-cove
];
homebrew = {
enable = true;
brews = [
"mas"
"fish-shell/fish-beta-4/fish"
];
taps = [
"fish-shell/fish-beta-4"
];
casks = [
"appcleaner"
"canon-eos-utility"
"capacities"
"chatgpt"
"discord"
"firefox@nightly"
"ghostty"
"karabiner-elements"
"keybase"
"raycast"
"reader"
"tailscale"
"veracrypt"
"wezterm"
"yubico-yubikey-manager"
"zen-browser"
"zoom"
];
masApps = {
"barbee hide your menu bar icons" = 1548711022;
"bitwarden" = 1352778147;
"dropover easy drag and drop" = 1355679052;
"endel focus relax sleep" = 1346247457;
"enchanted llm" = 6474268307;
"homeassistant" = 1099568401;
"jomo" = 1609960918;
"kindle" = 302584613;
"languagetool" = 1534275760;
"raycast" = 6738274497;
"session" = 1521432881;
"whatsapp" = 310633997;
"whisper transcription" = 1668083311;
"wipr2" = 1662217862;
"yubico authenticator" = 1497506650;
};
onActivation.cleanup = "zap";
onActivation.autoUpdate = true;
onActivation.upgrade = true;
};
system.defaults = {
dock.autohide = true;
};
system.defaults.NSGlobalDomain = {
AppleInterfaceStyle = "Dark";
AppleInterfaceStyleSwitchesAutomatically = true;
_HIHideMenuBar = false;
"com.apple.mouse.tapBehavior" = 1;
"com.apple.trackpad.scaling" = 1.0;
"com.apple.trackpad.forceClick" = true;
AppleEnableMouseSwipeNavigateWithScrolls = true;
AppleEnableSwipeNavigateWithScrolls = true;
InitialKeyRepeat = 15;
KeyRepeat = 2;
};
system.defaults.menuExtraClock = {
Show24Hour = false;
ShowAMPM = true;
ShowDayOfWeek = true;
ShowDate = 1;
};
system.defaults.trackpad = {
Clicking = true;
Dragging = true;
TrackpadRightClick = true;
ActuationStrength = 0;
FirstClickThreshold = 1;
SecondClickThreshold = 1;
TrackpadThreeFingerTapGesture = 2;
};
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Enable alternative shell support in nix-darwin.
users.users.subramk.shell = "/opt/homebrew/bin/fish"; #pkgs.fish;
programs.fish = {
enable = true;
useBabelfish = true;
vendor = {
config.enable = true;
completions.enable = true;
functions.enable = true;
};
};
programs.gnupg = {
agent.enable = true;
agent.enableSSHSupport = true;
};
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 5;
services.lorri.enable = true;
nix.optimise = {
automatic = true;
user = username;
};
nix.gc = {
automatic = true;
};
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
};
darwinSystem = nix-darwin.lib.darwinSystem {
modules = [
configuration
nix-homebrew.darwinModules.nix-homebrew
{
nix-homebrew = {
enable = true;
user = username;
autoMigrate = true;
};
}
];
};
in
{
darwinConfigurations."Krishnaswamys-M2" = darwinSystem;
darwinConfigurations."krishnaswamy-m1-pro" = darwinSystem;
darwinConfigurations."Krishnaswamys-MacBook-Pro-2" = darwinSystem;
};
}