generated from foambubble/foam-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.nix
executable file
·382 lines (353 loc) · 8.12 KB
/
home.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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
{
config,
pkgs,
...
}:
let
in
#anki-wrapper = pkgs.writeShellApplication {
# name = "anki";
# text = ''
# ${pkgs.lib.meta.getExe pkgs.nixgl.nixGLIntel} ${pkgs.lib.meta.getExe pkgs.anki}
# '';
#};
#ledger-wrapper = pkgs.writeShellApplication {
# name = "ledger";
# text = ''
# ${pkgs.lib.meta.getExe pkgs.nixgl.nixGLIntel} ${pkgs.lib.meta.getExe pkgs.ledger-live-desktop} "$@"
# '';
#};
#slack-wrapper = pkgs.writeShellApplication {
# name = "slack";
# text = ''
# ${pkgs.lib.meta.getExe pkgs.nixgl.nixGLIntel} ${pkgs.lib.meta.getExe pkgs.slack}
# '';
#};
#brave-wrapper = pkgs.writeShellApplication {
# name = "brave";
# text = ''
# ${pkgs.lib.meta.getExe pkgs.nixgl.nixGLIntel} ${pkgs.lib.meta.getExe pkgs.brave}
# '';
#};
{
#xdg = {
# enable = true;
#};
programs =
let
myname = "dz";
in
{
go.enable = true;
#bash = {
#enable = true;
#enableCompletion = true;
#enableLsColors = true;
#blesh.enable = true;
#enableAutosuggestions = true;
#enableSyntaxHighlighting = true;
# oh-my-bash = {
# enable = true;
# plugins = [
# "command-not-found"
# "history"
# "history-substring-search"
# ];
# custom = "$HOME/.config/bash/custom";
# };
#};
#obs-studio.enable = true;
#brave = {
# enable = true;
#};
#chromium.enable = true;
git = {
enable = true;
userName = "${myname}-lahoda";
userEmail = "${myname}@lahoda.pro";
extraConfig = {
user.signingkey = "B6DAD565C19E1C302B735664BF77F46FF7501BE1";
commit.gpgsign = true;
core.editor = "${pkgs.helix}/bin/hx";
};
};
# vscode = {
# enable = true;
# extensions = with pkgs.vscode-extensions; [
# #wmaurer.change-case
# matklad.rust-analyzer
# yzhang.markdown-all-in-one
# #ms-azuretools.vscode-docker
# ms-vscode-remote.remote-ssh
# jnoortheen.nix-ide
# github.copilot
# vscode-extensions.reditorsupport.r
# mads-hartmann.bash-ide-vscode
# donjayamanne.githistory
# mhutchie.git-graph
# #janisdd.vscode-edit-csv
# mechatroner.rainbow-csv
# # nomicfoundation.hardhat-solidity
# streetsidesoftware.code-spell-checker
# serayuzgur.crates
# # yo1dog.cursor-align
# editorconfig.editorconfig
# ms-vscode.hexeditor
# # dtsvet.vscode-wasm
# # alexcvzz.vscode-sqlite
# foam.foam-vscode
# golang.go
# haskell.haskell
# ziglang.vscode-zig
# ];
# };
}
// (import ./workstation.nix);
# note in home-manager
# environment.etc = {
# "resolv.conf".text = "nameserver ns-207.awsdns-25.com\n";
# };
nix = {
package = pkgs.nix;
settings = {
sandbox = "relaxed";
experimental-features = [
"flakes"
"nix-command"
];
narinfo-cache-negative-ttl = 0;
system-features = [ "kvm" ];
max-jobs = 2;
cores = 24;
auto-optimise-store = true;
allow-import-from-derivation = true;
gc-reserved-space = 18388608;
http-connections = 32;
http2 = true;
min-free = 100000000000;
max-free = 1000000000000;
# keep-outputs = true;
# keep-derivations = true;
substitute = true;
trusted-users = [
"dz"
"root"
"dzmitry-lahoda"
"dzmitry"
];
substituters = [
"https://nix-community.cachix.org/"
"https://cache.nixos.org/"
"https://nixpkgs-update.cachix.org"
];
trusted-public-keys = [
"nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
];
};
};
# nixpkgs = {
# config = {
# allowUnfree = true;
# extra-substituters = true;
# allowUnfreePredicate =
# pkg:
# builtins.elem (pkgs.lib.getName pkg) [
# "vscode"
# "vscode-extension-github-copilot"
# "vscode-extension-ms-vscode-remote-remote-ssh"
# "slack"
# "gh"
# "nvidia"
# "vscode-extensions.reditorsupport.r"
# "vscode-extensions.davidlday.languagetool-linter"
# "claude-code"
# ];
# };
# };
# not in home
# networking.nameservers = [ "ns-207.awsdns-25.com" ];
# not in home
#virtualisation.docker.enable = true;
#systemd = {
# user = {
# services = {
# github-runner = {
# Service = {
# ExecStart = "${pkgs.github-runner}";
# WorkingDirectory = "~/";
# Restart = "Always";
# };
# };
# };
# };
#};
services = {
gpg-agent = {
enable = true;
enableSshSupport = true;
};
syncthing = {
enable = true;
};
# nginx.virtualHosts = {
# "_" = {
# addSSL = true;
# enableACME = true;
# root = "/var/www/default";
# locations."/" = {
# root = pkgs.runCommand "testdir" { } ''
# mkdir "$out"
# echo "love is all you need" > "$out/index.html"
# : '';
# };
# locations."/substrate/client" = {
# proxyPass = "ws://34.88.1.226:9944";
# proxyWebsockets = true;
# };
# };
# };
# this requiest boot and kernel, so cannot do like that - need custom service
#kubo = {
# enable = true;
# user = "dz";
# group = "dz";
# autoMount = true;
# localDiscovery = true;
#};
};
home = {
# sessionVariables = {
# NIXPKGS_ALLOW_UNFREE = 1;
# };
stateVersion = "24.05";
username = "dz";
homeDirectory = "/home/dz";
packages =
let
netboot = [
pkgs.ipxe
pkgs.cdrtools
pkgs.qemu
pkgs.mtools
];
python-packages =
ps: with ps; [
numpy
cvxpy
wheel
virtualenv
];
python = pkgs.python3.withPackages python-packages;
in
with pkgs;
netboot
++ [
python3
elan
# lean4
poetry
pyo3-pack
typst
uv
(rWrapper.override {
packages = with rPackages; [
devtools
OpenRepGrid
rgl
];
})
# dust
# ledger-live-desktop
# ledger-wrapper
# rmesg
#glib.dev
#libiconv
#tp-note
# xz
act
alejandra
attr
bandwhich
bat
bottom
cachix
cargo-limit
cmake
dasel
delta
direnv
eza
fd
fzf
ripgrep-all
fsearch
gh
# claude-code
git-lfs
gopls
grpcurl
haskell.compiler.ghcHEAD
languagetool
languagetool-rust
fasttext
opentofu
qpdf
helix
home-manager
hwinfo
nurl
poppler_utils
hyperfine
jq
pandoc
jujutsu
tectonic # pdf
kubo
languagetool
lazygit
llvm
nginx
nix
nix-tree
nixd
nixfmt-rfc-style
nixgl.nixGLIntel
nodejs
openssl
openssl.dev
pijul
pkg-config
procs
protobuf
radianWrapper
rclone
rclone-browser
ripgrep
rocksdb
rust-script
rust-toolchain
ryujinx
sad
sd
shadow
sqlfluff
starship
translate-shell
watchexec
websocat
xsv
yarn
yt-dlp
zoxide
];
};
}
# [Desktop Entry]
# Name=ledger
# Exec=/usr/bin/ledger %u
# NoDisplay=true
# Type=Application
# MimeType=x-scheme-handler/ledgerlive;