forked from CharlesChiuGit/nix-hm-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome-darwin.nix
230 lines (216 loc) · 4.39 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
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
{ inputs, outputs, config, pkgs, lib, ... }:
with lib;
{
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default
# You can also split up your configuration and import pieces of it here:
# ./nvim.nix
];
nixpkgs = {
overlays = [
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
# Nicely reload system units when changing configs
# systemd.user.startServices = "sd-switch";
home = {
# home.username = lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname);
username = "charles";
homeDirectory = "/Users/charles";
stateVersion = "24.11";
};
# https://search.nixos.org/packages?query=
# https://home-manager-options.extranix.com/?query=
home.packages = with pkgs; [
chafa
curl
git
gnupg
gnutar
gzip
hstr
tmux
unzip
vim
wget
xdg-ninja
zsh
# c/c++ cli
btop
fzy
jq
lnav
# python cli
git-fame
git-filter-repo
# golang cli
fzf
glow
lazydocker
lazygit
nix-search-cli
pistol
# vfox ## TODO: https://github.com/version-fox/vfox/issues/53
# rust cli
# joshuto
# xq
bat
delta
dua
eva
eza
fd
fh # official CLI for FlakeHub
jaq
lsd
mise
ripgrep
ripgrep-all
ripsecrets
rye # like cargo but for python
sd
starship
tokei
topgrade
tree-sitter
uv # pip in rust
xh
yazi
zellij
zoxide
];
home.file = {
".zshenv".source = ./conf.d/zsh/.zshenv;
# ".ssh/config".source = ./conf.d/ssh/config;
".config/topgrade.toml".source = ./conf.d/topgrade/topgrade.toml;
".local/bin" = {
recursive = true;
source = ./conf.d/Usercommand;
};
};
programs.home-manager.enable = true;
xdg.enable = true;
xdg.configFile = {
# core-utils
"zsh" = {
recursive = true;
source = ./conf.d/zsh;
};
"git" = {
recursive = true;
source = ./conf.d/git;
};
# lang-vms
"mise" = {
recursive = true;
source = ./conf.d/mise;
};
"conda" = {
recursive = true;
source = ./conf.d/conda;
};
# cli-utils
"bat" = {
recursive = true;
source = ./conf.d/bat;
};
"btop" = {
recursive = true;
source = ./conf.d/btop;
};
"fd" = {
recursive = true;
source = ./conf.d/fd;
};
"glow" = {
recursive = true;
source = ./conf.d/glow;
};
"htop" = {
recursive = true;
source = ./conf.d/htop;
};
"lazygit" = {
recursive = true;
source = ./conf.d/lazygit;
};
"lsd" = {
recursive = true;
source = ./conf.d/lsd;
};
"npm" = {
recursive = true;
source = ./conf.d/npm;
};
"pistol" = {
recursive = true;
source = ./conf.d/pistol;
};
"starship" = {
recursive = true;
source = ./conf.d/starship;
};
"tmux" = {
recursive = true;
source = ./conf.d/tmux;
};
"wget" = {
recursive = true;
source = ./conf.d/wget;
};
"yarn" = {
recursive = true;
source = ./conf.d/yarn;
};
"yazi" = {
recursive = true;
source = ./conf.d/yazi;
};
"zellij" = {
recursive = true;
source = ./conf.d/zellij;
};
};
home.activation.nvimdotsActivatioinAction = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
if [ ! -d ~/.config/nvim ]; then
${pkgs.git}/bin/git clone https://github.com/CharlesChiuGit/nvimdots.lua.git ~/.config/nvim
fi
'';
programs.neovim = {
enable = true;
# package = pkgs.neovim-nightly;
withNodeJs = true;
withPython3 = true;
withRuby = false;
extraPackages = with pkgs;[
# Dependent packages used by default plugins
doq
cargo
clang
cmake
gcc
gnumake
go
ninja
pkg-config
yarn
lua51Packages.luarocks
];
extraPython3Packages = pyPkgs: with pyPkgs; [
docformatter
pynvim
];
# extraLuaPackages = luaPkgs: with luaPkgs; [
# luarocks # doesn't work, put in extraPackages
# ];
viAlias = true;
vimdiffAlias = true;
};
}