-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev.nix
317 lines (291 loc) · 7.2 KB
/
dev.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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
{
pkgs,
lib,
user,
config,
inputs',
...
}:
{
systemd.tmpfiles.rules = [
"L+ /home/${user}/.ssh/config - - - - ${pkgs.writeText "ssh-config" ''
${builtins.concatStringsSep "\n" (
let
hosts = (fromTOML (builtins.readFile ./sum.toml)).node;
in
lib.mapAttrsToList (n: v: ''
Host ${n}
HostName ${
if config.networking.hostName == "kaambl" then lib.getAddrFromCIDR v.unique_addr else v.addr
}
User ${v.user}
AddKeysToAgent yes
ForwardAgent yes
'') hosts
)}
Host gitee.com
HostName gitee.com
User riro
Host github.com
HostName ssh.github.com
User git
Port 443
Host git.dn42.dev
HostName git.dn42.dev
User git
Port 22
Host *
# ControlMaster auto
# ControlPath ~/.ssh/%r@%h:%p.socket
# ControlPersist 10m
Port 22
IdentityFile ${config.vaultix.secrets.id.path}
''}"
];
programs = {
ssh = {
startAgent = true;
enableAskPassword = true;
askPassword = "${pkgs.wayprompt}/bin/wayprompt-ssh-askpass";
# askPassword = "${pkgs.seahorse}/libexec/seahorse/ssh-askpass";
};
nh = {
enable = true;
# clean.enable = true;
# clean.extraArgs = "--keep-since 4d --keep 7";
flake = "/home/${user}/Src/nixos";
};
git.enable = true;
bash.interactiveShellInit = ''
eval "$(${lib.getExe pkgs.atuin} init bash)"
'';
fish.interactiveShellInit = ''
${lib.getExe pkgs.atuin} init fish | source
${lib.getExe pkgs.zoxide} init fish | source
'';
direnv = {
enable = true;
package = pkgs.direnv;
silent = false;
loadInNixShell = true;
direnvrcExtra = "";
nix-direnv = {
enable = true;
package = pkgs.nix-direnv;
};
};
};
environment.systemPackages =
lib.flatten (
lib.attrValues (
with pkgs;
{
python = [
(python311.withPackages (
ps: with ps; [
pandas
requests
absl-py
tldextract
bleak
matplotlib
clang
pyyaml
]
))
];
crypt = [
(openssl.override {
conf = pkgs.writeText "openssl.conf" ''
openssl_conf = openssl_init
[openssl_init]
engines = engine_section
ssl_conf = ssl_module
[engine_section]
pkcs11 = pkcs11_section
[pkcs11_section]
engine_id = pkcs11
dynamic_path = ${pkgs.libp11}/lib/engines/libpkcs11.so
MODULE_PATH = ${pkgs.opensc}/lib/opensc-pkcs11.so
init = 0
'';
})
minisign
ent
rage
age-plugin-yubikey
cryptsetup
tpm2-tss
tpm2-tools
yubikey-manager
monero-cli
yubikey-personalization
opensc
sbctl
];
dev = [
(nixos-rebuild-ng.override {
withNgSuffix = false;
# nix = inputs'.lix-module.packages.default;
})
zoxide
nodejs
# vscode.fhs
# nodejs_latest.pkgs.pnpm
# nodejs_latest
qemu-utils
# rustup
linuxPackages_latest.perf
strace
gitoxide
gitui
nushell
# radicle
# friture
pv
# gnome.dconf-editor
[
bpf-linker
gdb
gcc
gnumake
cmake
]
lua
delta
go
nix-tree
kotlin
inotify-tools
tmux
trunk
cargo-expand
wasmtime
comma
nix-update
osgint
];
lang = [
[
editorconfig-checker
kotlin-language-server
sumneko-lua-language-server
yaml-language-server
tree-sitter
stylua
biome
# black
]
# languages related
[
zig
# lldb
# haskell-language-server
gopls
cmake-language-server
zls
android-file-transfer
nixpkgs-review
shfmt
]
[
vscode-langservers-extracted
bash-language-server
]
[
# rust-analyzer
# nil
nixd
nil
shfmt
nixfmt-rfc-style
# taplo
rustfmt
clang-tools
# haskell-language-server
cmake-language-server
arduino-language-server
vhdl-ls
delve
# python311Packages.python-lsp-server
tinymist
]
];
# wine = [
# # bottles
# wineWowPackages.stable
# # support 32-bit only
# # wine
# # support 64-bit only
# (wine.override { wineBuild = "wine64"; })
# # wine-staging (version with experimental features)
# wineWowPackages.staging
# # winetricks (all versions)
# winetricks
# # native wayland support (unstable)
# wineWowPackages.waylandFull
# ];
db = [ mongosh ];
web = [ hugo ];
de = with gnomeExtensions; [
simple-net-speed
paperwm
];
virt = [
# virt-manager
virtiofsd
runwin
guix-run
runbkworm
bkworm
arch-run
# ubt-rv-run
#opulr-a-run
lunar-run
# virt-viewer
];
fs = [
gparted
e2fsprogs
fscrypt-experimental
f2fs-tools
cifs-utils
];
cmd = [
metasploit
# linuxKernel.packages.linux_latest_libre.cpupower
just
typst
cosmic-term
acpi
swww
distrobox
dmidecode
nix-output-monitor
rustic
];
info = [
parallel-disk-usage # disk space info
freshfetch
htop
onefetch
hardinfo
imgcat
nix-index
ccze
unar
];
bluetooth = [ bluetuith ];
sound = [ pulseaudio ];
display = [ cage ];
cursor = [ graphite-cursors ];
}
)
)
++ (with pkgs.nodePackages; [
typescript-language-server
node2nix
markdownlint-cli2
prettier
]);
}