-
Notifications
You must be signed in to change notification settings - Fork 1
/
home-darwin.nix
151 lines (134 loc) · 4.38 KB
/
home-darwin.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
# Tangled from README.org
{ config, pkgs, lib, ... }:
{
imports = [
./vim.nix
];
home.stateVersion = "23.05";
home.packages = with pkgs; [
pywal
# Darwin packages for home-manager (i.e.: nix-darwin)
alacritty
];
# NOTE: Copied from dev.nix
# TODO: Figure out how to re-use dev.nix config for Darwin and Linux
home.file = {
".config/git/ignore".source = ./git/ignore;
".wezterm.lua".source = ./wezterm/wezterm.lua;
};
# No corresponding option in nix-darwin, so we config this with hm
programs.git = {
enable = true;
userName = "David Asabina";
userEmail = "[email protected]";
lfs.enable = true;
aliases = {
wdiff = "diff --word-diff --word-diff-regex='\\w+'";
glog = "log --oneline --graph --all --decorate";
};
extraConfig = {
init = {
defaultBranch = "main";
};
core = {
editor = "nvim";
};
gpg = {
program = "gpg2";
};
sendemail = {
annotate = true;
smtpServer = "msmtp";
smtpServerOption = "-a vidbina";
};
color = {
ui = true;
diff = {
meta = "yellow bold";
frag = "magenta bold";
old = "red";
new = "green";
};
grep = {
match = "yellow";
filename = "blue";
linenumber = "brightblack";
};
status = {
added = "yellow";
changed = "green";
untracked = "brightblack";
};
};
};
};
# NOTE: Copied from common.nix
programs.direnv = {
enable = true;
nix-direnv = {
enable = true;
};
};
# NOTE: Enabling zsh also in hm in order to bring direnv bootstrap into scope
# See https://gist.github.com/jmatsushita/5c50ef14b4b96cb24ae5268dab613050?permalink_comment_id=4205285#gistcomment-4205285
programs.zsh.enable = true;
home.file.".hammerspoon".source = config.lib.file.mkOutOfStoreSymlink ./hammerspoon;
programs.vscode = {
enable = true;
extensions = with pkgs.my-vscode-extensions.vscode-marketplace; [
bbenoist.nix
be5invis.toml
elmtooling.elm-ls-vscode # depends on hbenl.vscode-test-explorer
github.copilot
github.copilot-chat
hbenl.vscode-test-explorer
hediet.vscode-drawio
mkhl.direnv
ms-azuretools.vscode-docker
ms-playwright.playwright
ms-python.python
ms-vscode-remote.remote-containers
tomoki1207.pdf
vscode-org-mode.org-mode
vscodevim.vim
gruntfuggly.todo-tree
];
keybindings = [
{
"key" = "ctrl+tab";
"command" = "workbench.action.nextEditorInGroup";
}
{
"key" = "ctrl+shift+tab";
"command" = "workbench.action.previousEditorInGroup";
}
];
userSettings = {
"editor.cursorSurroundingLines" = 8;
# https://code.visualstudio.com/docs/editor/extension-marketplace#_can-i-stop-vs-code-from-providing-extension-recommendations
"extensions.ignoreRecommendations" = true;
"extensions.showRecommendationsOnlyOnDemand" = true;
# https://code.visualstudio.com/docs/editor/extension-marketplace#_can-i-stop-vs-code-from-providing-extension-recommendations
"telemetry.telemetryLevel" = "off";
"vim.highlightedyank.enable" = true;
"window.autoDetectColorScheme" = true;
# https://www.roboleary.net/2021/11/06/vscode-you-dont-need-that-extension2.html#3-indentation-guides-colorization
"editor.guides.bracketPairs" = true;
"editor.guides.highlightActiveIndentation" = true;
"workbench.colorTheme" = "Default High Contrast Light";
"workbench.preferredDarkColorTheme" = "Default High Contrast";
"workbench.preferredLightColorTheme" = "Default High Contrast Light";
};
};
# home.file.".emacs.d".source = config.lib.file.mkOutOfStoreSymlink ./emacs;
# TODO: Fix hack of hardcoded dotfiles path
# NOTE: This repo must be checked out to ~/Code/vidbina/dotfiles
# A hardcoded .emacs.d source is used because mkOutOfStoreSymlink ./emacs
# does not seem to work on macOS.
# See https://discourse.nixos.org/t/accessing-home-manager-config-in-flakes/19864/8
# See https://github.com/nix-community/home-manager/issues/2085#issuecomment-861427318
home.file.".emacs.d".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Code/vidbina/dotfiles/emacs";
services.syncthing = {
enable = true;
};
}