mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 17:50:15 +00:00
Compare commits
826 Commits
begin-nix
...
nixosmodul
Author | SHA1 | Date | |
---|---|---|---|
b0b9827a2e | |||
9b3d2e39c9 | |||
5a1a843ecd | |||
2ddd980436 | |||
febf1071af | |||
05adc8a221 | |||
a463212023 | |||
2457ade6eb | |||
88d52614a9 | |||
2c663347ee | |||
02fc29c482 | |||
21cbe29bd8 | |||
c0da8391ef | |||
d4e203a04c | |||
38480e0c0c | |||
ee58f7a4ee | |||
4c4e250fa1 | |||
ffe867e6a8 | |||
b599162090 | |||
4b0d68089a | |||
b304e529b4 | |||
2b0f03ba1f | |||
2c4f215b6e | |||
066ea8e440 | |||
cd0c93c6d9 | |||
78e9c817d0 | |||
53a8cc83ea | |||
1cf5f46adf | |||
5348cbdf61 | |||
140b410ea0 | |||
b282e76be4 | |||
a26f5dc2b5 | |||
b0fcee6707 | |||
46e633c8b9 | |||
7a74f0a504 | |||
bacf1ab1fa | |||
ddf48998db | |||
23f72c3c2e | |||
77d81742a9 | |||
13c7859a78 | |||
0f4914db95 | |||
25e56b7421 | |||
a6ec04db7e | |||
2a56c04e17 | |||
894a22cb2d | |||
eefed57929 | |||
494cf355e9 | |||
c88718b649 | |||
790cb4a9d0 | |||
e3d4b36613 | |||
18154b6579 | |||
fb44473d22 | |||
c1e89fb20e | |||
04e8b8834e | |||
472a2b965c | |||
79eba7f333 | |||
28418c4e37 | |||
fa797c81f8 | |||
d243d68c72 | |||
f4f5f19183 | |||
3a40bb7485 | |||
e8456e131b | |||
8d8dd8ad62 | |||
bad49cb2c3 | |||
c052813f6d | |||
ed19eaafd1 | |||
09de243bd3 | |||
82a1954c26 | |||
6815af21dc | |||
3269d5e247 | |||
d337ffff51 | |||
df5fba19f8 | |||
8cc158221d | |||
f391433584 | |||
241b2deb49 | |||
605824c1a4 | |||
e8f4ee52c3 | |||
6518db291f | |||
a6551ce043 | |||
b089ec4668 | |||
5970555572 | |||
1083ee4ff8 | |||
a2bbcf7f55 | |||
f388aee56c | |||
958ab8a96b | |||
3059241c1c | |||
fe938ec713 | |||
05f705d794 | |||
f67a44fa87 | |||
713b835f70 | |||
480d515302 | |||
2337db0bda | |||
1510c8c31f | |||
8f8012e435 | |||
8d389013ad | |||
d013f980a7 | |||
3c51dd0db6 | |||
7f0600580f | |||
05d5fcb8f9 | |||
ca7a4ed408 | |||
cf73ce8136 | |||
82344372dd | |||
34cf2a4483 | |||
efb3933f5a | |||
cd067cce69 | |||
0d9df06bce | |||
b4e5852f48 | |||
1a60c5e9db | |||
2d8a84c286 | |||
319106364a | |||
fd5d6ab141 | |||
4df1132eb7 | |||
f4d9897f21 | |||
634baf0a7e | |||
600fd06974 | |||
c9ab46696d | |||
b5790a2795 | |||
61f26315d5 | |||
4fefe54435 | |||
0833a0009c | |||
e349ac35b8 | |||
49c2c013a2 | |||
985b8bf13b | |||
8283480fd1 | |||
d6611ca7a2 | |||
a13083a264 | |||
ff4db1463e | |||
afedfcf187 | |||
2e3c376d73 | |||
59824adb3a | |||
8e32c16fd3 | |||
76c80dd31d | |||
57de089baf | |||
f9c09deb2a | |||
b06b6490f4 | |||
514244476d | |||
47590abc3a | |||
f69d233c39 | |||
9b97c9ac84 | |||
bda59eeb4a | |||
e7468ecc46 | |||
1b798f5af0 | |||
4406116203 | |||
c53f1470ee | |||
da89732001 | |||
2176a53c4a | |||
28576c1b8f | |||
64590c539b | |||
78b364afd7 | |||
f219ce45c8 | |||
5002c881f7 | |||
5859377802 | |||
e6dbed2e17 | |||
86076f0844 | |||
2aea76c0e3 | |||
42a5ad40de | |||
d4fa322fb1 | |||
3d73f8cab4 | |||
0df8af607d | |||
61d9b103b0 | |||
71d0d3ca14 | |||
d5b0405b99 | |||
3cad3d2fb0 | |||
2acd9b3478 | |||
bf4be11718 | |||
4d38d1094f | |||
183babd2f0 | |||
12682a57e1 | |||
31170a616f | |||
4502c5ff62 | |||
59bd3590a4 | |||
ebacff7250 | |||
763f0bbdda | |||
18505d4cbb | |||
a7c04b59ed | |||
d46e6dad6b | |||
5e4642b92e | |||
7ab78767d4 | |||
366a7f6157 | |||
fb47302f3b | |||
cda3ee0a4c | |||
0ed11de174 | |||
ab6f80fc18 | |||
d1f21ec874 | |||
cdcc90f85d | |||
f5674134fc | |||
d37cabfd9a | |||
6e117769c6 | |||
f648e92c28 | |||
43343b2824 | |||
ab9136af2c | |||
a7fe90b236 | |||
5557065c8b | |||
de1fae2baf | |||
2c310fd2f2 | |||
aa4dc4a0c2 | |||
44821ea344 | |||
cb60542980 | |||
3fe6911e2d | |||
afa62c5510 | |||
fea0396dce | |||
13014e6cc1 | |||
640e447006 | |||
595a02383e | |||
3689f8ef52 | |||
ab6a339c34 | |||
e6456d7f02 | |||
fb74122458 | |||
d56a48cf65 | |||
30fe7c2d18 | |||
08716d1c98 | |||
60b68785a9 | |||
c360460d80 | |||
b1b5e77f47 | |||
67af160088 | |||
80d0451ff3 | |||
0ba2492c61 | |||
3dd7fa12b0 | |||
741692e6f1 | |||
7a547f99c0 | |||
18c9e1efc8 | |||
ac3d5e495c | |||
252b3d5dac | |||
6d0b0e3560 | |||
48d33a9ef5 | |||
c08f08692b | |||
a8d1369c49 | |||
450118d234 | |||
cc84f1d37a | |||
ded498f4c9 | |||
0d0ee1fc5a | |||
251dce68bb | |||
448c97665b | |||
86aa02aae4 | |||
6cd22bc7ce | |||
048de4772c | |||
700e59e6c8 | |||
07e0afa1e9 | |||
6577b9e49b | |||
58a0e6166d | |||
e8c5a10df7 | |||
37fa835c66 | |||
fa69557ced | |||
a9a06fb5fc | |||
ceaad9d186 | |||
521937e366 | |||
8915f17ea3 | |||
17799909b2 | |||
7a4c3b930d | |||
e7bbee5da0 | |||
2dda6a31bd | |||
e4d76189e6 | |||
0bc8a233d8 | |||
524a5aa347 | |||
b4ddb149cc | |||
d021baa1bb | |||
7063bd5f7a | |||
d040077d3a | |||
bf1d2f1e9e | |||
fd7c523ebd | |||
1b32457956 | |||
50acdd0c58 | |||
a0c99a8449 | |||
d1b144f441 | |||
adb7956213 | |||
e011a1c6f1 | |||
1d8638777c | |||
2620b43925 | |||
7d53a80d49 | |||
9b12369e43 | |||
427bd1a421 | |||
74e346fa63 | |||
4a803427fb | |||
d127ccacb0 | |||
54e89d3acd | |||
b258a40181 | |||
dfacb580ae | |||
650d1e91a2 | |||
397b08fab4 | |||
33e8a6bc9b | |||
7a39acef1a | |||
3438446347 | |||
dee7c7302a | |||
0d052a6463 | |||
8b98b8f29d | |||
96c64c4da1 | |||
47a1823af4 | |||
d86534727e | |||
13e5b9ddc5 | |||
bb200016cb | |||
dc00ef26b5 | |||
cf62184744 | |||
97ed5eb33b | |||
d672a77ddb | |||
52f9057ee5 | |||
7ddd9d9aa4 | |||
b9ddaf095c | |||
f304392d58 | |||
3beacf9f3c | |||
44c4084b57 | |||
42237eab13 | |||
2848ae9424 | |||
a6f9b985fc | |||
d1f12671b0 | |||
30f9f869a7 | |||
e1fc3317b5 | |||
07b5f855a6 | |||
5178c9f458 | |||
2ab37d3298 | |||
0176b14350 | |||
8342746b69 | |||
2340b862e5 | |||
b04c442c87 | |||
5bbba2be39 | |||
c871f59791 | |||
4ea56b0aab | |||
7ae0649456 | |||
660ea997df | |||
15f4116178 | |||
9386008fa2 | |||
920ec8b43e | |||
6241b8e624 | |||
7741394306 | |||
07fec71ba4 | |||
41d289c5db | |||
b2850e8b79 | |||
afd44279d2 | |||
d73ccab008 | |||
969e89cda3 | |||
38695b29bd | |||
40424a0102 | |||
d7b711ff02 | |||
7bd2125438 | |||
0448037a6b | |||
7075371b11 | |||
22885f1b27 | |||
52edaa7d9c | |||
c74d003a57 | |||
2d10939285 | |||
b15cd8c0b6 | |||
dfd903d3c9 | |||
2af30faf7c | |||
b718a01dc4 | |||
e16674c817 | |||
bf09e166a9 | |||
3dcafb8c25 | |||
be581dba1f | |||
941fa359d9 | |||
f6096e3472 | |||
cd204f5ac3 | |||
4c685eb8dd | |||
2694e3288c | |||
af31c65788 | |||
ef6c920c48 | |||
d97e3fda07 | |||
982566a92e | |||
27e2a42e46 | |||
41d8e30990 | |||
6f67e31723 | |||
7bca2775d1 | |||
89a95445e1 | |||
084e832039 | |||
e1e27ca065 | |||
6e26b64f43 | |||
0f112ea16b | |||
69a54b99c8 | |||
e2c351098b | |||
5410afb45b | |||
bc83c818db | |||
8cce61f4a8 | |||
595eac9367 | |||
a17a048d9d | |||
c2d0037bab | |||
e2af159c26 | |||
01e71e5810 | |||
c4c75cd587 | |||
a5e186ee87 | |||
170f8c67de | |||
b0aa82e7d0 | |||
7aacfe7887 | |||
d8b5d74dcb | |||
129e4bba4b | |||
e309889b0b | |||
5872abcc33 | |||
bfa9e8fc4e | |||
8dba2ef88b | |||
e89db82e7f | |||
4044721606 | |||
0637cc693b | |||
a9ae0c8858 | |||
da01f3be9b | |||
a7117fe4e9 | |||
c2b570b2af | |||
84ecbf9974 | |||
f38f782b63 | |||
31f3cfe77c | |||
a0089e28ae | |||
92223a49cd | |||
2434376963 | |||
f196f546b8 | |||
b4ba0706c0 | |||
90bc2ecd49 | |||
19de583433 | |||
8a97d9b2da | |||
015c393274 | |||
db0645075f | |||
034ff33e70 | |||
cd53060f02 | |||
f20b4ee31a | |||
381e06519b | |||
3ec1ef4394 | |||
d303924f02 | |||
485e8223cf | |||
657bec0929 | |||
4e23d677e8 | |||
5ce4ebf522 | |||
e6b7938218 | |||
1addb7ec21 | |||
ba14638a8a | |||
ddd517e0dd | |||
0ac3aec208 | |||
ae90b1041d | |||
9b0dcaba9f | |||
0bf5fd5862 | |||
7a9f7dd760 | |||
f834cc20f4 | |||
720a3cc409 | |||
9e3345ff9b | |||
50a538c78e | |||
6281e32275 | |||
8dd9c012cc | |||
daf1669c8b | |||
4e15c21df7 | |||
2c0cc201e9 | |||
5648cd29e7 | |||
32e8d60d02 | |||
2986ad06f5 | |||
8fe3cffc9f | |||
ea47b375b6 | |||
49148cbf93 | |||
14cb90cd52 | |||
39d465c7c1 | |||
9bca6e1321 | |||
82e04dcdb1 | |||
b3bcd89b7e | |||
54d0a73d08 | |||
14c1abf761 | |||
a06cb74340 | |||
6827aa4369 | |||
34049fa5fb | |||
5251f2cd5a | |||
bdcee575db | |||
e0370bf1d1 | |||
99f1777827 | |||
79f8e621e6 | |||
e9fef7dbbb | |||
842d25e798 | |||
5d5412bf1f | |||
4be7762aba | |||
d343c2a9f7 | |||
8efea24282 | |||
7559782749 | |||
d299b861b6 | |||
7edfcd9743 | |||
4e8546728e | |||
6353ac188e | |||
2a4a8efa48 | |||
8705f2a96f | |||
c42b0b20be | |||
f745a24462 | |||
42877bdebc | |||
59c5369783 | |||
51c75e2874 | |||
a22acac57d | |||
ee305529ce | |||
50665737e2 | |||
92e2eac11e | |||
e2400475f2 | |||
35aa851231 | |||
24acd220fb | |||
e1ac175333 | |||
df6ac12204 | |||
e9f85b815b | |||
5243003bad | |||
4f1c61bbe0 | |||
4851637770 | |||
cc801b4981 | |||
a10e33c1e1 | |||
050cbfcba7 | |||
3015f29f3b | |||
cfe3c137ba | |||
86b1ab61cb | |||
1e511ce08b | |||
8f5522c2c9 | |||
df3e8e60d7 | |||
9aad4efd27 | |||
682acdc8ae | |||
758321adc3 | |||
c646f126e2 | |||
faa7f74773 | |||
7093ba7791 | |||
076068aa85 | |||
6d08491f1c | |||
704acea26e | |||
372727c915 | |||
35a57d2905 | |||
8a22c80b2d | |||
83488999f8 | |||
b5f3e83f15 | |||
9b936105a0 | |||
bfd3eb997c | |||
6383d88b4b | |||
720ca5d94c | |||
e4b15ea100 | |||
0cfad06763 | |||
8ba28be649 | |||
85116fc8fd | |||
c4ee4cafa5 | |||
1d9f48f5d3 | |||
c08c5c5a9e | |||
b7788431d2 | |||
f5ab31dd82 | |||
5d3fbd35c9 | |||
d0b3be617c | |||
74e53a3cd1 | |||
6a47ffa024 | |||
454ceb7d7d | |||
98dcc471b4 | |||
2f58396c61 | |||
4ad1cff80e | |||
5a43ad997f | |||
fdfc66c7ad | |||
e22a4f3df2 | |||
a8f497e226 | |||
7861f9ec3a | |||
bd7290fe63 | |||
4f1e948843 | |||
baa20e4dbb | |||
f2f0ccd63f | |||
518d788c73 | |||
e2189397fc | |||
d7b2f36dfe | |||
07b00d3e3f | |||
e69dd6a98e | |||
efac9b98f7 | |||
89e2e52e44 | |||
4e3054d91e | |||
0229df9b97 | |||
708672b2e3 | |||
c67d84fcd1 | |||
985d80eaa2 | |||
1381b9d063 | |||
7dfef72177 | |||
df59e376f2 | |||
c048b7244f | |||
84a6f3a38a | |||
884f0cdeea | |||
b48c9aef12 | |||
404426c480 | |||
ac1e8828ed | |||
388e50d9d4 | |||
2539151df9 | |||
9a21db7165 | |||
f4786156de | |||
8d50690a79 | |||
cd62307786 | |||
3b38f0301a | |||
f4d5df0071 | |||
0fd3956bda | |||
aa8765b2a2 | |||
350d7bb3cd | |||
4b2a219e72 | |||
6f5b4725e7 | |||
3656ed7e8f | |||
60fe4caed4 | |||
36c4881384 | |||
bea0924972 | |||
3ba26ccfd5 | |||
3ea0e40121 | |||
f1fda23f3f | |||
93de15cec0 | |||
2b72ffb6cf | |||
86c86d0215 | |||
5b9058935d | |||
df96ff6cea | |||
e0777a40ca | |||
99bff6fa42 | |||
de023c2cd9 | |||
d3cd9891f3 | |||
f8edbeaeca | |||
077b3c9337 | |||
6c6d80a1d0 | |||
7603005864 | |||
490c78714f | |||
ec4dcbd3a6 | |||
3b385f21fc | |||
82e85a7d95 | |||
d28465e475 | |||
9099a9f63b | |||
b9d28efa4b | |||
78ea55f029 | |||
cb47f4bbd3 | |||
58ca0a0fe2 | |||
6cd48da8a4 | |||
eccd5e7e33 | |||
1a31d4d3e5 | |||
7baec572e3 | |||
9be5b17988 | |||
14ab11e526 | |||
6e72764ff1 | |||
9d6898e0d3 | |||
c75bffa0dc | |||
9ba095c29d | |||
e3d9fe083c | |||
835cebebfb | |||
2c07d8e24a | |||
73c837b710 | |||
5e6dd8c2b8 | |||
852385ef4d | |||
cc974cb013 | |||
ed2b61b03f | |||
446fc5d5c1 | |||
e9de34405f | |||
2bcf7ab079 | |||
284f54584e | |||
93f254abf9 | |||
c311e8625b | |||
7f00617856 | |||
40f06384ba | |||
d6657cee86 | |||
ce52be726f | |||
046b24d3aa | |||
2c4a737d37 | |||
337ddd6c35 | |||
7dece0be25 | |||
6b14485632 | |||
4540327cb8 | |||
43571c66dd | |||
fa25e24351 | |||
5f946b5d8c | |||
6f2fff80ed | |||
e215ef6428 | |||
417623965e | |||
672001829d | |||
531c78ebe0 | |||
01c5f09f41 | |||
f2d01ec575 | |||
67f8a8b08d | |||
ec0b1c4e04 | |||
6cd892f67a | |||
3304efab01 | |||
7bfc3c68bd | |||
d32757924f | |||
f65255c7c1 | |||
a35753cfd9 | |||
8aa532eb20 | |||
5057f8d597 | |||
0685a90aa3 | |||
9d7307d16d | |||
8e08b70d86 | |||
70d50a8681 | |||
f5508c747c | |||
47d09a98e2 | |||
69f5375541 | |||
b7a75da2d3 | |||
8cb2ec4e13 | |||
4da5e381b2 | |||
4735cce26f | |||
bbed1ed591 | |||
c797f5ab65 | |||
c89df227e6 | |||
5404476552 | |||
992496b1f0 | |||
2a5c896322 | |||
2a225debe5 | |||
cb66ca402e | |||
7296c0fefc | |||
b922cd8f09 | |||
71e4cc2f5a | |||
eadec0c699 | |||
4ccbd8b393 | |||
80209f3a4c | |||
f9d106e27d | |||
c8381110c5 | |||
9e12221b43 | |||
523a53f607 | |||
63c89ed902 | |||
3989a16015 | |||
55577615e2 | |||
703b2673ba | |||
03e1b99f51 | |||
2e53f7c779 | |||
23d178b2a2 | |||
e73b8be0cd | |||
516957c812 | |||
ece8b09fd1 | |||
30711aa05c | |||
0fb8bf410c | |||
712f0ea6a6 | |||
7312243963 | |||
addc286bf2 | |||
c969c50026 | |||
eb99ec48f7 | |||
2e737fd85c | |||
ba3aa9cd93 | |||
244c431c75 | |||
e7ad5c923f | |||
ed09f24529 | |||
d240456c9f | |||
3c65cfc70a | |||
bd0bf927e1 | |||
d2ab01ee15 | |||
1604e7ba47 | |||
41eff7f1d8 | |||
2177397947 | |||
df4ca6e4c4 | |||
e0c405f8e8 | |||
e51867e838 | |||
623e029b81 | |||
1424f6c983 | |||
c14702c9ee | |||
7d52ec7286 | |||
d49dbebf9d | |||
215e5157ab | |||
8c167a0367 | |||
449b452cd1 | |||
635414aa36 | |||
121e1e9c37 | |||
ecc00acc05 | |||
010b9bbc3d | |||
60414f062a | |||
ec42968d7d | |||
bbd39ca5e0 | |||
4d5791c213 | |||
62f74cdf4a | |||
82d5c72a7d | |||
7ad8892d81 | |||
b560659dfe | |||
ccf17ec001 | |||
322eb1310a | |||
0b7221bd6a | |||
cc06fadcd9 | |||
e2288101ad | |||
244b36aee3 | |||
98e5bc7cbf | |||
31fc8e204f | |||
fc66f23a49 | |||
f1bc34e8fd | |||
0aade99d4a | |||
b111045ab4 | |||
634e8cabac | |||
f493b263e0 | |||
e819c2a7b6 | |||
6a0a27714b | |||
b09a38201c | |||
26ee43fe84 | |||
38ea7742a1 | |||
d1269e8455 | |||
f314eb82b7 | |||
d913ad88d5 | |||
39d21d23f4 | |||
955c6b0aca | |||
f485a20e06 | |||
9914eae230 | |||
4ea1235c9c | |||
f025413ad1 | |||
154fe2917b | |||
29cf53f5f6 | |||
a3ff05b40c | |||
3a04b58574 | |||
21333baefd | |||
9e3244d8ea | |||
f40dc276e2 | |||
93a74e5d22 | |||
5ce2e5cbce | |||
3b223a88ca | |||
bd2433c869 | |||
216d325d5c | |||
59c65bfa53 | |||
beeebb178e | |||
dd07f97122 | |||
4d8de6b3bc | |||
b486085580 | |||
afefa06229 | |||
bc31e9d7df | |||
13a4cac980 | |||
b9747c4e6f | |||
06a455fcf4 | |||
7a9e9b75c0 | |||
007ed17e71 | |||
6453e6788e | |||
37647acbeb | |||
1f1769be70 | |||
b4dc2f0d18 | |||
4a8f41a151 | |||
e58763a168 | |||
16e4165d14 | |||
f51f0c0e3d | |||
096aa594a8 | |||
3a244110eb | |||
5f794c626b | |||
1c95039847 | |||
c69fa02713 | |||
81815ed551 | |||
8012fa7051 | |||
609bfb8132 | |||
c71ffe0ea2 | |||
aadeffecde | |||
cbb64f61fc | |||
170a2a24de | |||
f92b7cf891 | |||
a1962afef0 | |||
b9e248be32 | |||
e4b6c3c9ba | |||
249cbe5889 | |||
1f9fdac268 | |||
2705e636b9 | |||
43cbd18caf | |||
ba75ec2366 | |||
bb00648208 | |||
cf1e39a3b8 | |||
06a2c5eb3d | |||
03889db9f8 | |||
3a27c37f3e | |||
0989a15b5d | |||
bf180db95e |
15
.gitignore
vendored
15
.gitignore
vendored
@ -1,11 +1,8 @@
|
||||
.DS_Store
|
||||
nvim.configlink/dirs/*
|
||||
nvim.configlink/.netrwhist
|
||||
nvim.configlink/plugin/**
|
||||
nvim.configlink/plugged/**
|
||||
nvim.configlink/autoload/**
|
||||
fish.configlink/config.fish.bac
|
||||
fish.configlink/functions/vim.fish
|
||||
fish_variables
|
||||
homebrew/*.lock.json
|
||||
*.bak
|
||||
*.db
|
||||
**/.direnv/**
|
||||
result
|
||||
private/**
|
||||
templates/**/flake.lock
|
||||
!private/**.age
|
||||
|
1
.stylua.toml
Normal file
1
.stylua.toml
Normal file
@ -0,0 +1 @@
|
||||
indent_type = "Spaces"
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Noah Masur
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
40
Makefile
40
Makefile
@ -1,40 +0,0 @@
|
||||
bootstrap:
|
||||
./scripts/bootstrap
|
||||
./scripts/setup_symlinks
|
||||
|
||||
all:
|
||||
./scripts/bootstrap
|
||||
./scripts/setup_symlinks
|
||||
./scripts/setup_fish
|
||||
./scripts/brews
|
||||
./scripts/update_rust_analyzer
|
||||
./scripts/rust
|
||||
./scripts/cargos
|
||||
./scripts/setup_cheatsheet
|
||||
./scripts/setup_ytfzf
|
||||
|
||||
fish: bootstrap
|
||||
./scripts/setup_fish
|
||||
|
||||
macos: bootstrap
|
||||
./scripts/configure_macos
|
||||
|
||||
brews: bootstrap
|
||||
./scripts/brews
|
||||
|
||||
casks: bootstrap
|
||||
./scripts/casks
|
||||
|
||||
rust:
|
||||
./scripts/update_rust_analyzer
|
||||
./scripts/rust
|
||||
|
||||
cargos: rust
|
||||
./scripts/rust
|
||||
|
||||
programs:
|
||||
./scripts/setup_cheatsheet
|
||||
./scripts/setup_ytfzf
|
||||
|
||||
python: brews
|
||||
npm install -g pyright
|
75
README.md
Normal file
75
README.md
Normal file
@ -0,0 +1,75 @@
|
||||
# System Configurations
|
||||
|
||||
This repository contains configuration files for my NixOS, macOS, and WSL
|
||||
hosts.
|
||||
|
||||
They are organized and managed by [Nix](https://nixos.org), so some of the
|
||||
configuration may be difficult to translate to a non-Nix system.
|
||||
|
||||
## System Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
| --- | --- | --- |
|
||||
| OS | [NixOS](https://nixos.org) | [Link](./modules/nixos) |
|
||||
| Display Server | [X11](https://www.x.org/wiki/) | [Link](./modules/nixos/graphical/xorg.nix) |
|
||||
| Compositor | [Picom](https://github.com/yshui/picom) | [Link](./modules/nixos/graphical/picom.nix) |
|
||||
| Window Manager | [i3](https://i3wm.org/) | [Link](./modules/nixos/graphical/i3.nix) |
|
||||
| Panel | [Polybar](https://polybar.github.io/) | [Link](./modules/nixos/graphical/polybar.nix) |
|
||||
| Font | [Victor Mono](https://rubjo.github.io/victor-mono/) | [Link](./modules/nixos/graphical/fonts.nix) |
|
||||
| Launcher | [Rofi](https://github.com/davatorium/rofi) | [Link](./modules/nixos/graphical/rofi.nix) |
|
||||
|
||||
## User Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
| --- | --- | --- |
|
||||
| Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./modules/common) |
|
||||
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) |
|
||||
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
||||
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starhip.nix) |
|
||||
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) |
|
||||
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix) |
|
||||
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
|
||||
| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./modules/common/applications/firefox.nix) |
|
||||
| E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./modules/common/mail/aerc.nix) |
|
||||
| File Manager | [Nautilus](https://wiki.gnome.org/action/show/Apps/Files) | [Link](./modules/common/applications/nautilus.nix) |
|
||||
| PDF Reader | [Zathura](https://pwmt.org/projects/zathura/) | [Link](./modules/common/applications/media.nix) |
|
||||
| Video Player | [mpv](https://mpv.io/) | [Link](./modules/common/applications/media.nix) |
|
||||
|
||||
## macOS Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
| --- | --- | --- |
|
||||
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) |
|
||||
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
Click [here](./docs/installation.md) for detailed installation instructions.
|
||||
|
||||
# Neovim
|
||||
|
||||
Try out my Neovim config with nix:
|
||||
|
||||
```bash
|
||||
nix run github:nmasur/dotfiles#neovim
|
||||
```
|
||||
|
||||
Or build it as a package:
|
||||
|
||||
```bash
|
||||
nix build github:nmasur/dotfiles#neovim
|
||||
```
|
||||
|
||||
If you already have a Neovim configuration, you may need to move it out of
|
||||
`~/.config/nvim` or set `XDG_CONFIG_HOME` to another value; otherwise both
|
||||
configs might conflict with each other.
|
||||
|
||||
# Flake Templates
|
||||
|
||||
You can also use the [templates](./templates/) as flakes for starting new
|
||||
projects:
|
||||
|
||||
```bash
|
||||
nix flake init --template github:nmasur/dotfiles#poetry
|
||||
```
|
@ -1,839 +0,0 @@
|
||||
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||
|
||||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty itself.
|
||||
#env:
|
||||
# TERM variable
|
||||
#
|
||||
# This value is used to set the `$TERM` environment variable for
|
||||
# each instance of Alacritty. If it is not present, alacritty will
|
||||
# check the local terminfo database and use `alacritty` if it is
|
||||
# available, otherwise `xterm-256color` is used.
|
||||
#TERM: alacritty
|
||||
#TERM: xterm-256color
|
||||
|
||||
window:
|
||||
# Window dimensions (changes require restart)
|
||||
#
|
||||
# Specified in number of columns/lines, not pixels.
|
||||
# If both are `0`, this setting is ignored.
|
||||
dimensions:
|
||||
columns: 130
|
||||
lines: 50
|
||||
|
||||
# Window position (changes require restart)
|
||||
#
|
||||
# Specified in number of pixels.
|
||||
# If the position is not set, the window manager will handle the placement.
|
||||
#position:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Window padding (changes require restart)
|
||||
#
|
||||
# Blank space added around the window in pixels. This padding is scaled
|
||||
# by DPI and the specified value is always added at both opposing sides.
|
||||
padding:
|
||||
x: 20
|
||||
y: 20
|
||||
|
||||
# Spread additional padding evenly around the terminal content.
|
||||
#dynamic_padding: false
|
||||
|
||||
# Window decorations
|
||||
#
|
||||
# Values for `decorations`:
|
||||
# - full: Borders and title bar
|
||||
# - none: Neither borders nor title bar
|
||||
#
|
||||
# Values for `decorations` (macOS only):
|
||||
# - transparent: Title bar, transparent background and title bar buttons
|
||||
# - buttonless: Title bar, transparent background, but no title bar buttons
|
||||
decorations: full
|
||||
|
||||
# Startup Mode (changes require restart)
|
||||
#
|
||||
# Values for `startup_mode`:
|
||||
# - Windowed
|
||||
# - Maximized
|
||||
# - Fullscreen
|
||||
#
|
||||
# Values for `startup_mode` (macOS only):
|
||||
# - SimpleFullscreen
|
||||
startup_mode: SimpleFullscreen
|
||||
|
||||
# Window title
|
||||
#title: Alacritty
|
||||
|
||||
# Window class (Linux/BSD only):
|
||||
#class:
|
||||
# Application instance name
|
||||
#instance: Alacritty
|
||||
# General application class
|
||||
#general: Alacritty
|
||||
|
||||
# GTK theme variant (Linux/BSD only)
|
||||
#
|
||||
# Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
|
||||
# Set this to `None` to use the default theme variant.
|
||||
#gtk_theme_variant: None
|
||||
|
||||
scrolling:
|
||||
# Maximum number of lines in the scrollback buffer.
|
||||
# Specifying '0' will disable scrolling.
|
||||
history: 10000
|
||||
|
||||
# Scrolling distance multiplier.
|
||||
#multiplier: 3
|
||||
|
||||
# Font configuration
|
||||
font:
|
||||
# Normal (roman) font face
|
||||
normal:
|
||||
# Font family
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) Menlo
|
||||
# - (Linux/BSD) monospace
|
||||
# - (Windows) Consolas
|
||||
#family: Fira Code
|
||||
#family: Noto Sans Mono
|
||||
family: Fira Mono for Powerline
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Regular
|
||||
|
||||
# Bold font face
|
||||
#bold:
|
||||
# Font family
|
||||
#
|
||||
# If the bold family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Bold
|
||||
|
||||
# Italic font face
|
||||
#italic:
|
||||
# Font family
|
||||
#
|
||||
# If the italic family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Italic
|
||||
|
||||
# Bold italic font face
|
||||
#bold_italic:
|
||||
# Font family
|
||||
#
|
||||
# If the bold italic family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Bold Italic
|
||||
|
||||
# Point size
|
||||
size: 18.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
||||
#offset:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Glyph offset determines the locations of the glyphs within their cells with
|
||||
# the default being at the bottom. Increasing `x` moves the glyph to the right,
|
||||
# increasing `y` moves the glyph upward.
|
||||
#glyph_offset:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Thin stroke font rendering (macOS only)
|
||||
#
|
||||
# Thin strokes are suitable for retina displays, but for non-retina screens
|
||||
# it is recommended to set `use_thin_strokes` to `false`.
|
||||
#use_thin_strokes: true
|
||||
|
||||
# If `true`, bold text is drawn using the bright color variants.
|
||||
#draw_bold_text_with_bright_colors: false
|
||||
|
||||
# Colors (Tomorrow Night)
|
||||
#colors:
|
||||
# Default colors
|
||||
#primary:
|
||||
# background: '#1d1f21'
|
||||
# foreground: '#c5c8c6'
|
||||
|
||||
# Bright and dim foreground colors
|
||||
#
|
||||
# The dimmed foreground color is calculated automatically if it is not present.
|
||||
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
|
||||
# is `false`, the normal foreground color will be used.
|
||||
#dim_foreground: '#828482'
|
||||
#bright_foreground: '#eaeaea'
|
||||
|
||||
# Cursor colors
|
||||
#
|
||||
# Colors which should be used to draw the terminal cursor.
|
||||
#
|
||||
# Allowed values are CellForeground and CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#cursor:
|
||||
# text: CellBackground
|
||||
# cursor: CellForeground
|
||||
|
||||
# Vi mode cursor colors
|
||||
#
|
||||
# Colors for the cursor when the vi mode is active.
|
||||
#
|
||||
# Allowed values are CellForeground and CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#vi_mode_cursor:
|
||||
# text: CellBackground
|
||||
# cursor: CellForeground
|
||||
|
||||
# Selection colors
|
||||
#
|
||||
# Colors which should be used to draw the selection area.
|
||||
#
|
||||
# Allowed values are CellForeground and CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#selection:
|
||||
# text: CellBackground
|
||||
# background: CellForeground
|
||||
|
||||
# Search colors
|
||||
#
|
||||
# Colors used for the search bar and match highlighting.
|
||||
#
|
||||
# Allowed values are CellForeground and CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#search:
|
||||
# matches:
|
||||
# foreground: '#000000'
|
||||
# background: '#ffffff'
|
||||
#
|
||||
# bar:
|
||||
# background: CellForeground
|
||||
# foreground: CellBackground
|
||||
|
||||
# Normal colors
|
||||
#normal:
|
||||
# black: '#1d1f21'
|
||||
# red: '#cc6666'
|
||||
# green: '#b5bd68'
|
||||
# yellow: '#f0c674'
|
||||
# blue: '#81a2be'
|
||||
# magenta: '#b294bb'
|
||||
# cyan: '#8abeb7'
|
||||
# white: '#c5c8c6'
|
||||
|
||||
# Bright colors
|
||||
#bright:
|
||||
# black: '#666666'
|
||||
# red: '#d54e53'
|
||||
# green: '#b9ca4a'
|
||||
# yellow: '#e7c547'
|
||||
# blue: '#7aa6da'
|
||||
# magenta: '#c397d8'
|
||||
# cyan: '#70c0b1'
|
||||
# white: '#eaeaea'
|
||||
|
||||
# Dim colors
|
||||
#
|
||||
# If the dim colors are not set, they will be calculated automatically based
|
||||
# on the `normal` colors.
|
||||
#dim:
|
||||
# black: '#131415'
|
||||
# red: '#864343'
|
||||
# green: '#777c44'
|
||||
# yellow: '#9e824c'
|
||||
# blue: '#556a7d'
|
||||
# magenta: '#75617b'
|
||||
# cyan: '#5b7d78'
|
||||
# white: '#828482'
|
||||
|
||||
# Indexed Colors
|
||||
#
|
||||
# The indexed colors include all colors from 16 to 256.
|
||||
# When these are not set, they're filled with sensible defaults.
|
||||
#
|
||||
# Example:
|
||||
# `- { index: 16, color: '#ff00ff' }`
|
||||
#
|
||||
#indexed_colors: []
|
||||
|
||||
# Bell
|
||||
#
|
||||
# The bell is rung every time the BEL control character is received.
|
||||
#bell:
|
||||
# Visual Bell Animation
|
||||
#
|
||||
# Animation effect for flashing the screen when the visual bell is rung.
|
||||
#
|
||||
# Values for `animation`:
|
||||
# - Ease
|
||||
# - EaseOut
|
||||
# - EaseOutSine
|
||||
# - EaseOutQuad
|
||||
# - EaseOutCubic
|
||||
# - EaseOutQuart
|
||||
# - EaseOutQuint
|
||||
# - EaseOutExpo
|
||||
# - EaseOutCirc
|
||||
# - Linear
|
||||
#animation: EaseOutExpo
|
||||
|
||||
# Duration of the visual bell flash. A `duration` of `0` will disable the
|
||||
# visual bell animation.
|
||||
#duration: 0
|
||||
|
||||
# Visual bell animation color.
|
||||
#color: '#ffffff'
|
||||
|
||||
# Bell Command
|
||||
#
|
||||
# This program is executed whenever the bell is rung.
|
||||
#
|
||||
# When set to `command: None`, no command will be executed.
|
||||
#
|
||||
# Example:
|
||||
# command:
|
||||
# program: notify-send
|
||||
# args: ["Hello, World!"]
|
||||
#
|
||||
#command: None
|
||||
|
||||
# Background opacity
|
||||
#
|
||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||
#background_opacity: 1.0
|
||||
|
||||
#selection:
|
||||
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||
|
||||
# When set to `true`, selected text will be copied to the primary clipboard.
|
||||
#save_to_clipboard: false
|
||||
|
||||
# Allow terminal applications to change Alacritty's window title.
|
||||
#dynamic_title: true
|
||||
|
||||
#cursor:
|
||||
# Cursor style
|
||||
#
|
||||
# Values for `style`:
|
||||
# - ▇ Block
|
||||
# - _ Underline
|
||||
# - | Beam
|
||||
#style: Block
|
||||
|
||||
# Vi mode cursor style
|
||||
#
|
||||
# If the vi mode cursor style is `None` or not specified, it will fall back to
|
||||
# the style of the active value of the normal cursor.
|
||||
#
|
||||
# See `cursor.style` for available options.
|
||||
#vi_mode_style: Block
|
||||
|
||||
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||
# window is not focused.
|
||||
#unfocused_hollow: true
|
||||
|
||||
# Thickness of the cursor relative to the cell width as floating point number
|
||||
# from `0.0` to `1.0`.
|
||||
#thickness: 0.15
|
||||
|
||||
# Live config reload (changes require restart)
|
||||
#live_config_reload: true
|
||||
|
||||
# Shell
|
||||
#
|
||||
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
|
||||
# Entries in `shell.args` are passed unmodified as arguments to the shell.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) /bin/bash --login
|
||||
# - (Linux/BSD) user login shell
|
||||
# - (Windows) powershell
|
||||
shell:
|
||||
program: /usr/local/bin/fish
|
||||
args:
|
||||
- --login
|
||||
- --init-command
|
||||
- tmux a -t noah || tmux new -s noah
|
||||
|
||||
# Startup directory
|
||||
#
|
||||
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||
# directory of the parent process will be used.
|
||||
#working_directory: None
|
||||
|
||||
# WinPTY backend (Windows only)
|
||||
#
|
||||
# Alacritty defaults to using the newer ConPTY backend if it is available,
|
||||
# since it resolves a lot of bugs and is quite a bit faster. If it is not
|
||||
# available, the WinPTY backend will be used instead.
|
||||
#
|
||||
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
|
||||
# even if the ConPTY backend is available.
|
||||
#winpty_backend: false
|
||||
|
||||
# Send ESC (\x1b) before characters when alt is pressed.
|
||||
#alt_send_esc: true
|
||||
|
||||
#mouse:
|
||||
# Click settings
|
||||
#
|
||||
# The `double_click` and `triple_click` settings control the time
|
||||
# alacritty should wait for accepting multiple clicks as one double
|
||||
# or triple click.
|
||||
#double_click: { threshold: 300 }
|
||||
#triple_click: { threshold: 300 }
|
||||
|
||||
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||
#hide_when_typing: false
|
||||
|
||||
#url:
|
||||
# URL launcher
|
||||
#
|
||||
# This program is executed when clicking on a text which is recognized as a URL.
|
||||
# The URL is always added to the command as the last parameter.
|
||||
#
|
||||
# When set to `launcher: None`, URL launching will be disabled completely.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) open
|
||||
# - (Linux/BSD) xdg-open
|
||||
# - (Windows) explorer
|
||||
#launcher:
|
||||
# program: xdg-open
|
||||
# args: []
|
||||
|
||||
# URL modifiers
|
||||
#
|
||||
# These are the modifiers that need to be held down for opening URLs when clicking
|
||||
# on them. The available modifiers are documented in the key binding section.
|
||||
#modifiers: None
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
# Mouse bindings are specified as a list of objects, much like the key
|
||||
# bindings further below.
|
||||
#
|
||||
# To trigger mouse bindings when an application running within Alacritty captures the mouse, the
|
||||
# `Shift` modifier is automatically added as a requirement.
|
||||
#
|
||||
# Each mouse binding will specify a:
|
||||
#
|
||||
# - `mouse`:
|
||||
#
|
||||
# - Middle
|
||||
# - Left
|
||||
# - Right
|
||||
# - Numeric identifier such as `5`
|
||||
#
|
||||
# - `action` (see key bindings)
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods` (see key bindings)
|
||||
#mouse_bindings:
|
||||
# - { mouse: Middle, action: PasteSelection }
|
||||
|
||||
# Key bindings
|
||||
#
|
||||
# Key bindings are specified as a list of objects. For example, this is the
|
||||
# default paste binding:
|
||||
#
|
||||
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||
#
|
||||
# Each key binding will specify a:
|
||||
#
|
||||
# - `key`: Identifier of the key pressed
|
||||
#
|
||||
# - A-Z
|
||||
# - F1-F24
|
||||
# - Key0-Key9
|
||||
#
|
||||
# A full list with available key codes can be found here:
|
||||
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
|
||||
#
|
||||
# Instead of using the name of the keys, the `key` field also supports using
|
||||
# the scancode of the desired key. Scancodes have to be specified as a
|
||||
# decimal number. This command will allow you to display the hex scancodes
|
||||
# for certain keys:
|
||||
#
|
||||
# `showkey --scancodes`.
|
||||
#
|
||||
# Then exactly one of:
|
||||
#
|
||||
# - `chars`: Send a byte sequence to the running application
|
||||
#
|
||||
# The `chars` field writes the specified string to the terminal. This makes
|
||||
# it possible to pass escape sequences. To find escape codes for bindings
|
||||
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
||||
# of tmux. Note that applications use terminfo to map escape sequences back
|
||||
# to keys. It is therefore required to update the terminfo when changing an
|
||||
# escape sequence.
|
||||
#
|
||||
# - `action`: Execute a predefined action
|
||||
#
|
||||
# - ToggleViMode
|
||||
# - SearchForward
|
||||
# - SearchBackward
|
||||
# - Copy
|
||||
# - Paste
|
||||
# - PasteSelection
|
||||
# - IncreaseFontSize
|
||||
# - DecreaseFontSize
|
||||
# - ResetFontSize
|
||||
# - ScrollPageUp
|
||||
# - ScrollPageDown
|
||||
# - ScrollHalfPageUp
|
||||
# - ScrollHalfPageDown
|
||||
# - ScrollLineUp
|
||||
# - ScrollLineDown
|
||||
# - ScrollToTop
|
||||
# - ScrollToBottom
|
||||
# - ClearHistory
|
||||
# - Hide
|
||||
# - Minimize
|
||||
# - Quit
|
||||
# - ToggleFullscreen
|
||||
# - SpawnNewInstance
|
||||
# - ClearLogNotice
|
||||
# - ClearSelection
|
||||
# - ReceiveChar
|
||||
# - None
|
||||
#
|
||||
# (`mode: Vi` only):
|
||||
# - Open
|
||||
# - Up
|
||||
# - Down
|
||||
# - Left
|
||||
# - Right
|
||||
# - First
|
||||
# - Last
|
||||
# - FirstOccupied
|
||||
# - High
|
||||
# - Middle
|
||||
# - Low
|
||||
# - SemanticLeft
|
||||
# - SemanticRight
|
||||
# - SemanticLeftEnd
|
||||
# - SemanticRightEnd
|
||||
# - WordRight
|
||||
# - WordLeft
|
||||
# - WordRightEnd
|
||||
# - WordLeftEnd
|
||||
# - Bracket
|
||||
# - ToggleNormalSelection
|
||||
# - ToggleLineSelection
|
||||
# - ToggleBlockSelection
|
||||
# - ToggleSemanticSelection
|
||||
# - SearchNext
|
||||
# - SearchPrevious
|
||||
# - SearchStart
|
||||
# - SearchEnd
|
||||
#
|
||||
# (macOS only):
|
||||
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
|
||||
#
|
||||
# (Linux/BSD only):
|
||||
# - CopySelection: Copies into selection buffer
|
||||
#
|
||||
# - `command`: Fork and execute a specified command plus arguments
|
||||
#
|
||||
# The `command` field must be a map containing a `program` string and an
|
||||
# `args` array of command line parameter strings. For example:
|
||||
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods`: Key modifiers to filter binding actions
|
||||
#
|
||||
# - Command
|
||||
# - Control
|
||||
# - Option
|
||||
# - Super
|
||||
# - Shift
|
||||
# - Alt
|
||||
#
|
||||
# Multiple `mods` can be combined using `|` like this:
|
||||
# `mods: Control|Shift`.
|
||||
# Whitespace and capitalization are relevant and must match the example.
|
||||
#
|
||||
# - `mode`: Indicate a binding for only specific terminal reported modes
|
||||
#
|
||||
# This is mainly used to send applications the correct escape sequences
|
||||
# when in different modes.
|
||||
#
|
||||
# - AppCursor
|
||||
# - AppKeypad
|
||||
# - Alt
|
||||
#
|
||||
# A `~` operator can be used before a mode to apply the binding whenever
|
||||
# the mode is *not* active, e.g. `~Alt`.
|
||||
#
|
||||
# Bindings are always filled by default, but will be replaced when a new
|
||||
# binding with the same triggers is defined. To unset a default binding, it can
|
||||
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
||||
# a no-op if you do not wish to receive input characters for that binding.
|
||||
#
|
||||
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||
# in the order they were defined in.
|
||||
key_bindings:
|
||||
- { key: F, mods: Super, action: ToggleSimpleFullscreen }
|
||||
|
||||
# Reference for escape codes: https://www.gaijin.at/en/infos/ascii-ansi-character-table
|
||||
|
||||
- { key: L, mods : Super, chars: "\x1F" } # CMD-L sends null key for fish
|
||||
- { key: H, mods : Super|Shift, chars: "\x02p" } # CMD-SHIFT-H previous tmux window
|
||||
- { key: L, mods : Super|Shift, chars: "\x02n" } # CMD-SHIFT-L next tmux window
|
||||
|
||||
- { key: Return, mods : Shift, chars: "\x1b[13;2u" }
|
||||
- { key: Return, mods : Control, chars: "\x1b[13;5u" }
|
||||
- { key: Return, mods : Control|Shift, chars: "\x1b[13;6u" }
|
||||
|
||||
- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
- { key: PageUp, action: ScrollPageUp }
|
||||
- { key: PageUp, mode: Alt, chars: "\x1B[5~" }
|
||||
- { key: PageUp, mods: Shift, chars: "\x1B[5~" }
|
||||
- { key: PageDown, action: ScrollPageDown }
|
||||
- { key: PageDown, mode: Alt, chars: "\x1B[6~" }
|
||||
- { key: PageDown, mods: Shift, chars: "\x1B[6~" }
|
||||
- { key: Home, action: ScrollToTop }
|
||||
- { key: Home, mode: Alt, chars: "\x1BOH" }
|
||||
- { key: Home, mods: Shift, chars: "\x1B[H" }
|
||||
- { key: End, action: ScrollToBottom }
|
||||
- { key: End, mode: Alt, chars: "\x1BOF" }
|
||||
- { key: End, mods: Shift, chars: "\x1B[F" }
|
||||
- { key: Tab, mods: Alt, chars: "\x1B\t" }
|
||||
- { key: Tab, mods: Alt|Shift, chars: "\x1B\x1B[Z" }
|
||||
- { key: Back, chars: "\x7F" }
|
||||
- { key: Back, mods: Alt, chars: "\x1B\x7F" }
|
||||
- { key: Back, mods: Alt|Shift, chars: "\x1B\x08" }
|
||||
- { key: Space, mods: Control, chars: "\x00" }
|
||||
- { key: Space, mods: Alt, chars: "\x20" }
|
||||
- { key: Left, mods: Alt, chars: "\x1Bb" }
|
||||
- { key: Left, mods: Alt|Shift, chars: "\x1B\x1B[D" }
|
||||
- { key: Right, mods: Alt, chars: "\x1Bf" }
|
||||
- { key: Right, mods: Alt|Shift, chars: "\x1B\x1B[C" }
|
||||
- { key: Down, mods: Alt, chars: "\x1B\x1B[B" }
|
||||
- { key: Down, mods: Alt|Shift, chars: "\x1B\x1B[B" }
|
||||
- { key: Up, mods: Alt, chars: "\x1B\x1B[A" }
|
||||
- { key: Up, mods: Alt|Shift, chars: "\x1B\x1B[A" }
|
||||
- { key: A, mods: Alt, chars: "\x1Ba" }
|
||||
- { key: A, mods: Alt|Shift, chars: "\x1BA" }
|
||||
- { key: B, mods: Alt, chars: "\x1Bb" }
|
||||
- { key: B, mods: Alt|Shift, chars: "\x1BB" }
|
||||
- { key: C, mods: Alt, chars: "\x1Bc" }
|
||||
- { key: C, mods: Alt|Shift, chars: "\x1BC" }
|
||||
- { key: D, mods: Alt, chars: "\x1Bd" }
|
||||
- { key: D, mods: Alt|Shift, chars: "\x1BD" }
|
||||
- { key: E, mods: Alt, chars: "\x1Be" }
|
||||
- { key: E, mods: Alt|Shift, chars: "\x1BE" }
|
||||
- { key: F, mods: Alt, chars: "\x1Bf" }
|
||||
- { key: F, mods: Alt|Shift, chars: "\x1BF" }
|
||||
- { key: G, mods: Alt, chars: "\x1Bg" }
|
||||
- { key: G, mods: Alt|Shift, chars: "\x1BG" }
|
||||
- { key: H, mods: Alt, chars: "\x1Bh" }
|
||||
- { key: H, mods: Alt|Shift, chars: "\x1BH" }
|
||||
- { key: I, mods: Alt, chars: "\x1Bi" }
|
||||
- { key: I, mods: Alt|Shift, chars: "\x1BI" }
|
||||
- { key: J, mods: Alt, chars: "\x1Bj" }
|
||||
- { key: J, mods: Alt|Shift, chars: "\x1BJ" }
|
||||
- { key: K, mods: Alt, chars: "\x1Bk" }
|
||||
- { key: K, mods: Alt|Shift, chars: "\x1BK" }
|
||||
- { key: L, mods: Alt, chars: "\x1Bl" }
|
||||
- { key: L, mods: Alt|Shift, chars: "\x1BL" }
|
||||
- { key: M, mods: Alt, chars: "\x1Bm" }
|
||||
- { key: M, mods: Alt|Shift, chars: "\x1BM" }
|
||||
- { key: N, mods: Alt, chars: "\x1Bn" }
|
||||
- { key: N, mods: Alt|Shift, chars: "\x1BN" }
|
||||
- { key: O, mods: Alt, chars: "\x1Bo" }
|
||||
- { key: O, mods: Alt|Shift, chars: "\x1BO" }
|
||||
- { key: P, mods: Alt, chars: "\x1Bp" }
|
||||
- { key: P, mods: Alt|Shift, chars: "\x1BP" }
|
||||
- { key: Q, mods: Alt, chars: "\x1Bq" }
|
||||
- { key: Q, mods: Alt|Shift, chars: "\x1BQ" }
|
||||
- { key: R, mods: Alt, chars: "\x1Br" }
|
||||
- { key: R, mods: Alt|Shift, chars: "\x1BR" }
|
||||
- { key: S, mods: Alt, chars: "\x1Bs" }
|
||||
- { key: S, mods: Alt|Shift, chars: "\x1BS" }
|
||||
- { key: T, mods: Alt, chars: "\x1Bt" }
|
||||
- { key: T, mods: Alt|Shift, chars: "\x1BT" }
|
||||
- { key: U, mods: Alt, chars: "\x1Bu" }
|
||||
- { key: U, mods: Alt|Shift, chars: "\x1BU" }
|
||||
- { key: V, mods: Alt, chars: "\x1Bv" }
|
||||
- { key: V, mods: Alt|Shift, chars: "\x1BV" }
|
||||
- { key: W, mods: Alt, chars: "\x1Bw" }
|
||||
- { key: W, mods: Alt|Shift, chars: "\x1BW" }
|
||||
- { key: X, mods: Alt, chars: "\x1Bx" }
|
||||
- { key: X, mods: Alt|Shift, chars: "\x1BX" }
|
||||
- { key: Y, mods: Alt, chars: "\x1By" }
|
||||
- { key: Y, mods: Alt|Shift, chars: "\x1BY" }
|
||||
- { key: Z, mods: Alt, chars: "\x1Bz" }
|
||||
- { key: Z, mods: Alt|Shift, chars: "\x1BZ" }
|
||||
- { key: Key1, mods: Alt, chars: "\x1B1" }
|
||||
- { key: Key1, mods: Alt|Shift, chars: "\x1B!" }
|
||||
- { key: Key2, mods: Alt, chars: "\x1B2" }
|
||||
- { key: Key2, mods: Alt|Shift, chars: "\x1B#" }
|
||||
- { key: Key3, mods: Alt, chars: "\x1B3" }
|
||||
- { key: Key3, mods: Alt|Shift, chars: "\x1B#" }
|
||||
- { key: Key4, mods: Alt, chars: "\x1B4" }
|
||||
- { key: Key4, mods: Alt|Shift, chars: "\x1B$" }
|
||||
- { key: Key5, mods: Alt, chars: "\x1B5" }
|
||||
- { key: Key5, mods: Alt|Shift, chars: "\x1B%" }
|
||||
- { key: Key6, mods: Alt, chars: "\x1B6" }
|
||||
- { key: Key6, mods: Alt|Shift, chars: "\x1B^" }
|
||||
- { key: Key7, mods: Alt, chars: "\x1B7" }
|
||||
- { key: Key7, mods: Alt|Shift, chars: "\x1B&" }
|
||||
- { key: Key8, mods: Alt, chars: "\x1B8" }
|
||||
- { key: Key8, mods: Alt|Shift, chars: "\x1B*" }
|
||||
- { key: Key9, mods: Alt, chars: "\x1B9" }
|
||||
- { key: Key9, mods: Alt|Shift, chars: "\x1B(" }
|
||||
- { key: Key0, mods: Alt, chars: "\x1B0" }
|
||||
- { key: Key0, mods: Alt|Shift, chars: "\x1B)" }
|
||||
- { key: Minus, mods: Alt, chars: "\x1B-" }
|
||||
- { key: Minus, mods: Alt|Shift, chars: "\x1B_" }
|
||||
- { key: Equals, mods: Alt, chars: "\x1B=" }
|
||||
- { key: Equals, mods: Alt|Shift, chars: "\x1B+" }
|
||||
- { key: LBracket, mods: Alt, chars: "\x1B[" }
|
||||
- { key: LBracket, mods: Alt|Shift, chars: "\x1B{" }
|
||||
- { key: RBracket, mods: Alt, chars: "\x1B]" }
|
||||
- { key: RBracket, mods: Alt|Shift, chars: "\x1B}" }
|
||||
- { key: Backslash, mods: Alt, chars: "\x1B\\" }
|
||||
- { key: Backslash, mods: Alt|Shift, chars: "\x1B|" }
|
||||
- { key: Semicolon, mods: Alt, chars: "\x1B;" }
|
||||
- { key: Semicolon, mods: Alt|Shift, chars: "\x1B:" }
|
||||
- { key: Apostrophe, mods: Alt, chars: "\x1B'" }
|
||||
- { key: Apostrophe, mods: Alt|Shift, chars: "\x1B\"" }
|
||||
- { key: Comma, mods: Alt, chars: "\x1B," }
|
||||
- { key: Comma, mods: Alt|Shift, chars: "\x1B<" }
|
||||
- { key: Period, mods: Alt, chars: "\x1B." }
|
||||
- { key: Period, mods: Alt|Shift, chars: "\x1B>" }
|
||||
- { key: Slash, mods: Alt, chars: "\x1B/" }
|
||||
- { key: Slash, mods: Alt|Shift, chars: "\x1B?" }
|
||||
- { key: Grave, mods: Alt, chars: "\x1B`" }
|
||||
- { key: Grave, mods: Alt|Shift, chars: "\x1B~" }
|
||||
# - { key: E, mods: Alt, chars: "\x1be" } # Send ALT-E for fish
|
||||
|
||||
#- { key: Paste, action: Paste }
|
||||
#- { key: Copy, action: Copy }
|
||||
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||
#- { key: L, mods: Control, mode: ~Vi, chars: "\x0c" }
|
||||
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
|
||||
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
|
||||
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
|
||||
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
|
||||
|
||||
# Vi Mode
|
||||
#- { key: Space, mods: Shift|Control, mode: Vi, action: ScrollToBottom }
|
||||
#- { key: Space, mods: Shift|Control, action: ToggleViMode }
|
||||
#- { key: Escape, mode: Vi, action: ClearSelection }
|
||||
#- { key: I, mode: Vi, action: ScrollToBottom }
|
||||
#- { key: I, mode: Vi, action: ToggleViMode }
|
||||
#- { key: Y, mods: Control, mode: Vi, action: ScrollLineUp }
|
||||
#- { key: E, mods: Control, mode: Vi, action: ScrollLineDown }
|
||||
#- { key: G, mode: Vi, action: ScrollToTop }
|
||||
#- { key: G, mods: Shift, mode: Vi, action: ScrollToBottom }
|
||||
#- { key: B, mods: Control, mode: Vi, action: ScrollPageUp }
|
||||
#- { key: F, mods: Control, mode: Vi, action: ScrollPageDown }
|
||||
#- { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp }
|
||||
#- { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown }
|
||||
#- { key: Y, mode: Vi, action: Copy }
|
||||
#- { key: Y, mode: Vi, action: ClearSelection }
|
||||
#- { key: Copy, mode: Vi, action: ClearSelection }
|
||||
#- { key: V, mode: Vi, action: ToggleNormalSelection }
|
||||
#- { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection }
|
||||
#- { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection }
|
||||
#- { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection }
|
||||
#- { key: Return, mode: Vi, action: Open }
|
||||
#- { key: K, mode: Vi, action: Up }
|
||||
#- { key: J, mode: Vi, action: Down }
|
||||
#- { key: H, mode: Vi, action: Left }
|
||||
#- { key: L, mode: Vi, action: Right }
|
||||
#- { key: Up, mode: Vi, action: Up }
|
||||
#- { key: Down, mode: Vi, action: Down }
|
||||
#- { key: Left, mode: Vi, action: Left }
|
||||
#- { key: Right, mode: Vi, action: Right }
|
||||
#- { key: Key0, mode: Vi, action: First }
|
||||
#- { key: Key4, mods: Shift, mode: Vi, action: Last }
|
||||
#- { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied }
|
||||
#- { key: H, mods: Shift, mode: Vi, action: High }
|
||||
#- { key: M, mods: Shift, mode: Vi, action: Middle }
|
||||
#- { key: L, mods: Shift, mode: Vi, action: Low }
|
||||
#- { key: B, mode: Vi, action: SemanticLeft }
|
||||
#- { key: W, mode: Vi, action: SemanticRight }
|
||||
#- { key: E, mode: Vi, action: SemanticRightEnd }
|
||||
#- { key: B, mods: Shift, mode: Vi, action: WordLeft }
|
||||
#- { key: W, mods: Shift, mode: Vi, action: WordRight }
|
||||
#- { key: E, mods: Shift, mode: Vi, action: WordRightEnd }
|
||||
#- { key: Key5, mods: Shift, mode: Vi, action: Bracket }
|
||||
#- { key: Slash, mode: Vi, action: SearchForward }
|
||||
#- { key: Slash, mods: Shift, mode: Vi, action: SearchBackward }
|
||||
#- { key: N, mode: Vi, action: SearchNext }
|
||||
#- { key: N, mods: Shift, mode: Vi, action: SearchPrevious }
|
||||
|
||||
# (Windows, Linux, and BSD only)
|
||||
#- { key: V, mods: Control|Shift, action: Paste }
|
||||
#- { key: C, mods: Control|Shift, action: Copy }
|
||||
#- { key: F, mods: Control|Shift, action: SearchForward }
|
||||
#- { key: B, mods: Control|Shift, action: SearchBackward }
|
||||
#- { key: C, mods: Control|Shift, mode: Vi, action: ClearSelection }
|
||||
#- { key: Insert, mods: Shift, action: PasteSelection }
|
||||
#- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Add, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Subtract, mods: Control, action: DecreaseFontSize }
|
||||
#- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||
|
||||
# (Windows only)
|
||||
#- { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||
|
||||
# (macOS only)
|
||||
#- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" }
|
||||
#- { key: Key0, mods: Command, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Add, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
||||
#- { key: K, mods: Command, action: ClearHistory }
|
||||
#- { key: V, mods: Command, action: Paste }
|
||||
#- { key: C, mods: Command, action: Copy }
|
||||
#- { key: C, mods: Command, mode: Vi, action: ClearSelection }
|
||||
#- { key: H, mods: Command, action: Hide }
|
||||
#- { key: M, mods: Command, action: Minimize }
|
||||
#- { key: Q, mods: Command, action: Quit }
|
||||
#- { key: W, mods: Command, action: Quit }
|
||||
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||
#- { key: F, mods: Command, action: SearchForward }
|
||||
#- { key: B, mods: Command, action: SearchBackward }
|
||||
|
||||
#debug:
|
||||
# Display the time it takes to redraw each frame.
|
||||
#render_timer: false
|
||||
|
||||
# Keep the log file after quitting Alacritty.
|
||||
#persistent_logging: false
|
||||
|
||||
# Log level
|
||||
#
|
||||
# Values for `log_level`:
|
||||
# - None
|
||||
# - Error
|
||||
# - Warn
|
||||
# - Info
|
||||
# - Debug
|
||||
# - Trace
|
||||
#log_level: Warn
|
||||
|
||||
# Print all received window events.
|
||||
#print_events: false
|
34
apps/default.nix
Normal file
34
apps/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ pkgs, ... }: rec {
|
||||
|
||||
# Show quick helper
|
||||
default = import ./help.nix { inherit pkgs; };
|
||||
|
||||
# Format primary disk
|
||||
format-root = import ./format-root.nix { inherit pkgs; };
|
||||
|
||||
# Format and install from nothing (deprecated)
|
||||
installer = import ./installer.nix { inherit pkgs; };
|
||||
|
||||
# Display the readme for this repository
|
||||
readme = import ./readme.nix { inherit pkgs; };
|
||||
|
||||
# Rebuild
|
||||
rebuild = import ./rebuild.nix { inherit pkgs; };
|
||||
|
||||
# Load the SSH key for this machine
|
||||
loadkey = import ./loadkey.nix { inherit pkgs; };
|
||||
|
||||
# Encrypt secret for all machines
|
||||
encrypt-secret = import ./encrypt-secret.nix { inherit pkgs; };
|
||||
|
||||
# Re-encrypt secrets for all machines
|
||||
reencrypt-secrets = import ./reencrypt-secrets.nix { inherit pkgs; };
|
||||
|
||||
# Connect machine metrics to Netdata Cloud
|
||||
netdata = import ./netdata-cloud.nix { inherit pkgs; };
|
||||
|
||||
# Run neovim as an app
|
||||
neovim = import ./neovim.nix { inherit pkgs; };
|
||||
nvim = neovim;
|
||||
|
||||
}
|
19
apps/encrypt-secret.nix
Normal file
19
apps/encrypt-secret.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
# nix run github:nmasur/dotfiles#encrypt-secret > private/mysecret.age
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (pkgs.writeShellScript "encrypt-secret" ''
|
||||
printf "\nEnter the secret data to encrypt for all hosts...\n\n" 1>&2
|
||||
read -p "Secret: " secret
|
||||
printf "\nEncrypting...\n\n" 1>&2
|
||||
tmpfile=$(mktemp)
|
||||
echo "''${secret}" > ''${tmpfile}
|
||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||
builtins.toString ../public-keys
|
||||
} $tmpfile
|
||||
rm $tmpfile
|
||||
'');
|
||||
|
||||
}
|
39
apps/format-root.nix
Normal file
39
apps/format-root.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
# This script will partition and format drives; use at your own risk!
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (pkgs.writeShellScript "format-root" ''
|
||||
set -e
|
||||
|
||||
DISK=$1
|
||||
|
||||
if [ -z "''${DISK}" ]; then
|
||||
${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \
|
||||
--foreground "#fb4934" \
|
||||
"Missing required parameter." \
|
||||
"Usage: format-root -- <disk>" \
|
||||
"Flake example: nix run github:nmasur/dotfiles#format-root -- nvme0n1"
|
||||
echo "(exiting)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${pkgs.disko-packaged}/bin/disko \
|
||||
--mode create \
|
||||
--dry-run \
|
||||
--flake "path:$(pwd)#root" \
|
||||
--arg disk \""/dev/''${DISK}"\"
|
||||
|
||||
${pkgs.gum}/bin/gum confirm \
|
||||
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
|
||||
--default=false
|
||||
|
||||
${pkgs.disko-packaged}/bin/disko \
|
||||
--mode create \
|
||||
--flake "path:$(pwd)#root" \
|
||||
--arg disk "/dev/''${DISK}"
|
||||
|
||||
'');
|
||||
|
||||
}
|
23
apps/help.nix
Normal file
23
apps/help.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (pkgs.writeShellScript "default" ''
|
||||
${pkgs.gum}/bin/gum style --margin "1 2" --padding "0 2" --foreground "15" --background "55" "Options"
|
||||
${pkgs.gum}/bin/gum format --type=template -- ' {{ Italic "Run with" }} {{ Color "15" "69" " nix run github:nmasur/dotfiles#" }}{{ Color "15" "62" "someoption" }}{{ Color "15" "69" " " }}.'
|
||||
echo ""
|
||||
echo ""
|
||||
${pkgs.gum}/bin/gum format --type=template -- \
|
||||
' • {{ Color "15" "57" " readme " }} {{ Italic "Documentation for this repository." }}' \
|
||||
' • {{ Color "15" "57" " rebuild " }} {{ Italic "Switch to this configuration." }}' \
|
||||
' • {{ Color "15" "57" " installer " }} {{ Italic "Format and install from nothing." }}' \
|
||||
' • {{ Color "15" "57" " neovim " }} {{ Italic "Test out the Neovim package." }}' \
|
||||
' • {{ Color "15" "57" " loadkey " }} {{ Italic "Load an ssh key for this machine using melt." }}' \
|
||||
' • {{ Color "15" "57" " encrypt-secret " }} {{ Italic "Encrypt a secret for all machines." }}' \
|
||||
' • {{ Color "15" "57" " reencrypt-secrets " }} {{ Italic "Reencrypt all secrets when new machine is added." }}' \
|
||||
' • {{ Color "15" "57" " netdata " }} {{ Italic "Connect a machine to Netdata cloud." }}'
|
||||
echo ""
|
||||
echo ""
|
||||
'');
|
||||
|
||||
}
|
48
apps/installer.nix
Normal file
48
apps/installer.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
# Inspired by https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix
|
||||
# This script will partition and format drives; use at your own risk!
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (pkgs.writeShellScript "installer" ''
|
||||
set -e
|
||||
|
||||
DISK=$1
|
||||
FLAKE=$2
|
||||
PARTITION_PREFIX=""
|
||||
|
||||
if [ -z "$DISK" ] || [ -z "$FLAKE" ]; then
|
||||
${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \
|
||||
--foreground "#fb4934" \
|
||||
"Missing required parameter." \
|
||||
"Usage: installer -- <disk> <host>" \
|
||||
"Example: installer -- nvme0n1 desktop" \
|
||||
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 desktop"
|
||||
echo "(exiting)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$DISK" in nvme*)
|
||||
PARTITION_PREFIX="p"
|
||||
esac
|
||||
|
||||
${pkgs.gum}/bin/gum confirm \
|
||||
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
|
||||
--default=false
|
||||
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mklabel gpt
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart primary 512MiB 100%
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart ESP fat32 1MiB 512MiB
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- set 3 esp on
|
||||
mkfs.ext4 -L nixos /dev/''${DISK}''${PARTITION_PREFIX}1
|
||||
mkfs.fat -F 32 -n boot /dev/''${DISK}''${PARTITION_PREFIX}2
|
||||
|
||||
mount /dev/disk/by-label/nixos /mnt
|
||||
mkdir --parents /mnt/boot
|
||||
mount /dev/disk/by-label/boot /mnt/boot
|
||||
|
||||
${pkgs.nixos-install-tools}/bin/nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
|
||||
'');
|
||||
|
||||
}
|
12
apps/loadkey.nix
Normal file
12
apps/loadkey.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (pkgs.writeShellScript "loadkey" ''
|
||||
printf "\nEnter the seed phrase for your SSH key...\n"
|
||||
printf "\nThen press ^D when complete.\n\n"
|
||||
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
|
||||
printf "\n\nContinuing activation.\n\n"
|
||||
'');
|
||||
|
||||
}
|
12
apps/neovim.nix
Normal file
12
apps/neovim.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
type = "app";
|
||||
|
||||
program = "${
|
||||
(import ../modules/common/neovim/package {
|
||||
inherit pkgs;
|
||||
colors = (import ../colorscheme/nord).dark;
|
||||
})
|
||||
}/bin/nvim";
|
||||
|
||||
}
|
19
apps/netdata-cloud.nix
Normal file
19
apps/netdata-cloud.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (pkgs.writeShellScript "netdata-cloud" ''
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
exit 1
|
||||
fi
|
||||
mkdir --parents --mode 0750 /var/lib/netdata/cloud.d
|
||||
printf "\nEnter the claim token for netdata cloud...\n\n"
|
||||
read -p "Token: " token
|
||||
echo "''${token}" > /var/lib/netdata/cloud.d/token
|
||||
chown -R netdata:netdata /var/lib/netdata
|
||||
${pkgs.netdata}/bin/netdata-claim.sh -id=$(uuidgen)
|
||||
printf "\n\nNow restart netdata service.\n\n"
|
||||
'');
|
||||
|
||||
}
|
9
apps/readme.nix
Normal file
9
apps/readme.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (pkgs.writeShellScript "readme" ''
|
||||
${pkgs.glow}/bin/glow --pager ${builtins.toString ../README.md}
|
||||
'');
|
||||
|
||||
}
|
15
apps/rebuild.nix
Normal file
15
apps/rebuild.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (pkgs.writeShellScript "rebuild" ''
|
||||
echo ${pkgs.system}
|
||||
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
||||
if [ "$SYSTEM" == "darwin" ]; then
|
||||
sudo darwin-rebuild switch --flake ${builtins.toString ../.}
|
||||
else
|
||||
doas nixos-rebuild switch --flake ${builtins.toString ../.}
|
||||
fi
|
||||
'');
|
||||
|
||||
}
|
27
apps/reencrypt-secrets.nix
Normal file
27
apps/reencrypt-secrets.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
# nix run github:nmasur/dotfiles#reencrypt-secrets ./private
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (pkgs.writeShellScript "reencrypt-secrets" ''
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Must provide directory to reencrypt."
|
||||
exit 1
|
||||
fi
|
||||
encrypted=$1
|
||||
for encryptedfile in ''${1}/*; do
|
||||
tmpfile=$(mktemp)
|
||||
echo "Decrypting ''${encryptedfile}..."
|
||||
${pkgs.age}/bin/age --decrypt \
|
||||
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
||||
echo "Encrypting ''${encryptedfile}..."
|
||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||
builtins.toString ../public-keys
|
||||
} $tmpfile > $encryptedfile
|
||||
rm $tmpfile
|
||||
done
|
||||
echo "Finished."
|
||||
'');
|
||||
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
#!/usr/local/bin/nu
|
||||
|
||||
ls | sort-by size | reverse | keep 10
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/usr/local/bin/nu
|
||||
|
||||
ls **/* | where type == File | sort-by size | reverse | keep 10
|
13
bin/calc
13
bin/calc
@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Run a quick calculation with Ruby
|
||||
#
|
||||
# Usage: calc "1/2"
|
||||
|
||||
class Integer
|
||||
def /(other)
|
||||
fdiv(other)
|
||||
end
|
||||
end
|
||||
|
||||
puts eval(ARGV.join(""))
|
@ -1,16 +0,0 @@
|
||||
FROM alpine:latest
|
||||
|
||||
COPY requirements.txt /
|
||||
|
||||
RUN apk update && \
|
||||
apk add \
|
||||
openssh \
|
||||
python \
|
||||
py-pip \
|
||||
&& \
|
||||
pip install -r requirements.txt
|
||||
|
||||
COPY connect_cloud.sh /
|
||||
COPY connect_cloud.py /
|
||||
|
||||
ENTRYPOINT ["/connect_cloud.sh"]
|
@ -1,85 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""Connect to Cloud instances"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
import boto3
|
||||
|
||||
# Initiate the parser
|
||||
parser = argparse.ArgumentParser("Type the name of the connection you want")
|
||||
parser.add_argument('profile', metavar='P', nargs='?',
|
||||
help='an account to use')
|
||||
parser.add_argument('environment', metavar='E', nargs='?',
|
||||
help='an environment to specify')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Get AWS credentials profile
|
||||
profile_map = {
|
||||
'gs' : {
|
||||
'profile': 'ghoststory',
|
||||
'prod': 'id_rsa_gstory_prod.pem',
|
||||
'dev': 'id_rsa_gstory_prod.pem',
|
||||
'username': 'centos',
|
||||
},
|
||||
'di' : {
|
||||
'profile': 't2indies',
|
||||
'prod': 'disintegration-prod.pem',
|
||||
'dev': 'disintegration-dev.pem',
|
||||
'username': 'centos',
|
||||
},
|
||||
'pd' : {
|
||||
'profile': 't2indies',
|
||||
'prod': 't2indies-prod.pem',
|
||||
'dev': 't2indies-dev.pem',
|
||||
'username': 'centos',
|
||||
},
|
||||
'corp' : {
|
||||
'profile': 't2corp',
|
||||
'prod': 'take2games-corp.pem',
|
||||
'dev': 'take2games-corp.pem',
|
||||
'username': 'ec2-user',
|
||||
},
|
||||
'ksp' : {
|
||||
'profile': 'kerbal',
|
||||
'prod': 'kerbal_prod_key.pem',
|
||||
'dev': 'kerbal_dev_key.pem',
|
||||
'username': 'centos',
|
||||
},
|
||||
}
|
||||
profile_dict = profile_map.get(args.profile)
|
||||
profile = profile_dict['profile']
|
||||
|
||||
# Connect to AWS
|
||||
session = boto3.Session(profile_name=profile)
|
||||
client = session.client('ec2', verify=False)
|
||||
|
||||
response = client.describe_instances()
|
||||
|
||||
print(len(response['Reservations']), "total instances\n")
|
||||
|
||||
matched_instances = []
|
||||
for instance_wrapper in response['Reservations']:
|
||||
instance = instance_wrapper['Instances'][0]
|
||||
is_matched_env = False
|
||||
is_matched_role = False
|
||||
for tag in instance.get('Tags', []):
|
||||
if tag['Key'] == "site_env" and args.environment in tag['Value']:
|
||||
is_matched_env = True
|
||||
if tag['Key'] == "role" and tag['Value'] == 'host':
|
||||
is_matched_role = True
|
||||
if tag['Key'] == "Name":
|
||||
instance['Name'] = tag['Value']
|
||||
if is_matched_env and is_matched_role:
|
||||
matched_instances.append(instance)
|
||||
|
||||
for instance in matched_instances:
|
||||
print(instance['Name'])
|
||||
print(instance['PublicIpAddress'])
|
||||
print("")
|
||||
|
||||
with open("aws_connect", 'w') as outfile:
|
||||
outfile.write("ssh-keyscan {} >> ~/.ssh/known_hosts\n".format(matched_instances[0]['PublicIpAddress']))
|
||||
outfile.write("ssh -i ~/.ssh/{} {}@{}".format(profile_dict[args.environment], profile_dict['username'], matched_instances[0]['PublicIpAddress']))
|
||||
os.chmod("aws_connect", 0o755)
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
python connect_cloud.py "$@"
|
||||
|
||||
/aws_connect
|
@ -1,8 +0,0 @@
|
||||
boto3==1.9.239
|
||||
botocore==1.12.239
|
||||
docutils==0.15.2
|
||||
jmespath==0.9.4
|
||||
python-dateutil==2.8.0
|
||||
s3transfer==0.2.1
|
||||
six==1.12.0
|
||||
urllib3==1.25.8
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Stop all containers
|
||||
if [ "$(docker ps -a -q)" ]; then
|
||||
echo "Stopping docker containers..."
|
||||
docker stop $(docker ps -a -q)
|
||||
else
|
||||
echo "No running docker containers."
|
||||
fi
|
||||
|
||||
# Remove all stopped containers
|
||||
if [ "$(docker ps -a -q)" ]; then
|
||||
echo "Removing docker containers..."
|
||||
docker rm $(docker ps -a -q)
|
||||
else
|
||||
echo "No stopped docker containers."
|
||||
fi
|
||||
|
||||
# Remove all untagged images
|
||||
if [[ $(docker images | grep "^<none>") ]]; then
|
||||
docker rmi $(docker images | rg "^<none>" | awk '{print $3}')
|
||||
else
|
||||
echo "No untagged docker images."
|
||||
fi
|
||||
|
||||
echo "Cleaned up docker."
|
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copied from David Pedersen: https://github.com/davidpdrsn/dotfiles/blob/master/bin/git-pp
|
||||
|
||||
set -e
|
||||
|
||||
git_branch_name() {
|
||||
val=$( git branch 2>/dev/null | grep '^\*' | colrm 1 2 )
|
||||
echo "$val"
|
||||
}
|
||||
|
||||
git push --set-upstream origin "$(git_branch_name)"
|
@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Adapted from: https://seb.jambor.dev/posts/improving-shell-workflows-with-fzf/
|
||||
# Requires the following variables to be set:
|
||||
# - ATLASSIAN_EMAIL
|
||||
# - ATLASSIAN_API_TOKEN
|
||||
# - JIRA_HOSTNAME
|
||||
# - JIRA_PROJECT
|
||||
|
||||
choose_issue() {
|
||||
jq_template='"\(.key): \(.fields.summary)"'
|
||||
query="project=$JIRA_PROJECT AND status not in (\"Done\") AND assignee=currentUser()"
|
||||
|
||||
branch_name=$(
|
||||
curl \
|
||||
--data-urlencode "jql=$query" \
|
||||
--get \
|
||||
--user "$ATLASSIAN_EMAIL:$ATLASSIAN_API_TOKEN" \
|
||||
--silent \
|
||||
--compressed \
|
||||
"https://$JIRA_HOSTNAME/rest/api/2/search" |
|
||||
jq ".issues[] | $jq_template" |
|
||||
sed -e 's/"\(.*\)"/\1/' |
|
||||
fzf \
|
||||
--preview='jira-details {1}' \
|
||||
--preview-window=top:wrap |
|
||||
sed -e 's/: /:/' -e 's/[^a-zA-Z0-9:]/-/g' |
|
||||
awk -F ":" '{printf "%s/%s", $1, tolower($2)}'
|
||||
)
|
||||
|
||||
echo "$branch_name"
|
||||
}
|
||||
|
||||
issue_branch=$(choose_issue)
|
||||
if [ -n "$issue_branch" ]; then
|
||||
echo "git checkout -b \"$issue_branch\""
|
||||
fi
|
@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Adapted from: https://seb.jambor.dev/posts/improving-shell-workflows-with-fzf/
|
||||
# Requires the following variables to be set:
|
||||
# - ATLASSIAN_EMAIL
|
||||
# - ATLASSIAN_API_TOKEN
|
||||
# - JIRA_HOSTNAME
|
||||
# - JIRA_PROJECT (for other script)
|
||||
|
||||
issue_details() {
|
||||
jira_key=$(echo "$1" | cut -d":" -f1)
|
||||
jq_template='"'\
|
||||
'# \(.key): \(.fields.summary)\n'\
|
||||
'\n'\
|
||||
'*Created*: \(.fields.created)\n'\
|
||||
'*Status*: \(.fields.status.statusCategory.name)\n'\
|
||||
'*Reporter*: \(.fields.reporter.displayName)\n'\
|
||||
'*Priority*: \(.fields.priority.name)\n'\
|
||||
"*Epic*: https://$JIRA_HOSTNAME/browse/\(.fields.customfield_10014)\n"\
|
||||
'\n'\
|
||||
'## Link\n\n'\
|
||||
"https://$JIRA_HOSTNAME/browse/\(.key)\n"\
|
||||
'\n'\
|
||||
'## Description\n\n'\
|
||||
'\(.fields.description)'\
|
||||
'"'
|
||||
curl \
|
||||
--get \
|
||||
--user "$ATLASSIAN_EMAIL:$ATLASSIAN_API_TOKEN" \
|
||||
--silent \
|
||||
--compressed \
|
||||
"https://$JIRA_HOSTNAME/rest/api/2/issue/$jira_key" |
|
||||
jq "$jq_template" |
|
||||
xargs printf |
|
||||
bat -l md --color always --style plain
|
||||
}
|
||||
|
||||
issue_details "$1"
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
kubectl -n kube-system get secret $(kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}') -o json | jq -j --raw-output '.data.token' | base64 --decode | pbcopy
|
||||
|
||||
open http://localhost:8001/api/v1/namespaces/default/services/https:kubernetes-dashboard:https/proxy/#!/login
|
||||
|
||||
kubectl proxy
|
@ -1,3 +0,0 @@
|
||||
#!/usr/local/bin/nu
|
||||
|
||||
ls | sort-by modified | reverse | keep 5
|
13
bin/nuke
13
bin/nuke
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
nuke() {
|
||||
local pid
|
||||
pid=$(ps -ef | grep -v ^root | sed 1d | fzf -m | awk '{print $2}')
|
||||
|
||||
if [ "x$pid" != "x" ]
|
||||
then
|
||||
echo $pid | xargs kill -${1:-9}
|
||||
fi
|
||||
}
|
||||
|
||||
nuke
|
@ -1,3 +0,0 @@
|
||||
#!/usr/local/bin/nu
|
||||
|
||||
ls | sort-by modified | keep 5
|
16
bin/pod
16
bin/pod
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Credit: https://github.com/junegunn/fzf/blob/master/ADVANCED.md
|
||||
|
||||
read -ra tokens < <(
|
||||
kubectl get pods --all-namespaces |
|
||||
fzf --info=inline --layout=reverse --header-lines=1 --border \
|
||||
--prompt "$(kubectl config current-context | sed 's/-context$//')> " \
|
||||
--header $'Press CTRL-O to open log in editor\n\n' \
|
||||
--bind ctrl-/:toggle-preview \
|
||||
--bind "ctrl-o:execute:${EDITOR:-vim} <(kubectl logs --namespace {1} {2}) > /dev/tty" \
|
||||
--preview-window up,follow \
|
||||
--preview 'kubectl logs --follow --tail=100000 --namespace {1} {2}' "$@"
|
||||
)
|
||||
[ ${#tokens} -gt 1 ] &&
|
||||
kubectl exec -it --namespace "${tokens[0]}" "${tokens[1]}" -- /bin/sh
|
@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Credit: https://github.com/junegunn/fzf/blob/master/ADVANCED.md
|
||||
# Requires bash.
|
||||
|
||||
# 1. Search for text in files using Ripgrep
|
||||
# 2. Interactively narrow down the list using fzf
|
||||
# 3. Open the file in Vim
|
||||
IFS=: read -ra selected < <(
|
||||
rg \
|
||||
--color=always \
|
||||
--line-number \
|
||||
--no-heading \
|
||||
--smart-case \
|
||||
--iglob !/Library/** \
|
||||
--iglob !/System/** \
|
||||
--iglob "!Users/$HOME/Library/*" \
|
||||
"${*:-}" |
|
||||
fzf --ansi \
|
||||
--color "hl:-1:underline,hl+:-1:underline:reverse" \
|
||||
--delimiter : \
|
||||
--preview 'bat --color=always {1} --highlight-line {2}' \
|
||||
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
|
||||
)
|
||||
[ -n "${selected[0]}" ] && nvim "${selected[0]}" "+${selected[1]}"
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
security find-generic-password -s 1Password -w | op signin enterprise_console --output=raw > $HOME/.op_tmux_token_tmp
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/usr/local/bin/nu
|
||||
|
||||
ls -al | where type == Symlink | select name target
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
bucket="$1"
|
||||
access="$2"
|
||||
uplink ls ${access:+--access "$access"} "sj://$bucket/" | awk '{print $NF}' | xargs -I {} uplink rm ${access:+--access "$access"} "sj://$bucket/{}"
|
44
bin/vimv
44
bin/vimv
@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
# Lists the current directory's files in Vim, so you can edit it and save to rename them
|
||||
# USAGE: vimv [file1 file2]
|
||||
# https://github.com/thameera/vimv
|
||||
|
||||
declare -r FILENAMES_FILE=$(mktemp "${TMPDIR:-/tmp}/vimv.XXX")
|
||||
|
||||
trap '{ rm -f "${FILENAMES_FILE}" ; }' EXIT
|
||||
|
||||
if [ $# -ne 0 ]; then
|
||||
src=( "$@" )
|
||||
else
|
||||
IFS=$'\r\n' GLOBIGNORE='*' command eval 'src=($(ls))'
|
||||
fi
|
||||
|
||||
for ((i=0;i<${#src[@]};++i)); do
|
||||
echo "${src[i]}" >> "${FILENAMES_FILE}"
|
||||
done
|
||||
|
||||
${EDITOR:-vi} "${FILENAMES_FILE}"
|
||||
|
||||
IFS=$'\r\n' GLOBIGNORE='*' command eval 'dest=($(cat "${FILENAMES_FILE}"))'
|
||||
|
||||
if (( ${#src[@]} != ${#dest[@]} )); then
|
||||
echo "WARN: Number of files changed. Did you delete a line by accident? Aborting.." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
declare -i count=0
|
||||
for ((i=0;i<${#src[@]};++i)); do
|
||||
if [ "${src[i]}" != "${dest[i]}" ]; then
|
||||
mkdir -p "$(dirname "${dest[i]}")"
|
||||
if git ls-files --error-unmatch "${src[i]}" > /dev/null 2>&1; then
|
||||
git mv "${src[i]}" "${dest[i]}"
|
||||
else
|
||||
mv "${src[i]}" "${dest[i]}"
|
||||
fi
|
||||
((++count))
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$count" files renamed.
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
CACHE_FILE="$HOME/.tmux/.weather_cache"
|
||||
CACHE_TIME="$(stat -f %m "$CACHE_FILE")"
|
||||
NOW_TIME=$(date +%s)
|
||||
TIME_PASSED=$((NOW_TIME-CACHE_TIME))
|
||||
if [ "$TIME_PASSED" -gt "1200" ]
|
||||
then
|
||||
curl -m 2 -s "wttr.in/$WEATHER_CITY?format=%c%t" > "$CACHE_FILE"
|
||||
fi
|
||||
cat "$CACHE_FILE"
|
@ -1,6 +0,0 @@
|
||||
# Packages to install with Cargo
|
||||
|
||||
toml-cli # Parse TOML from the command line
|
||||
rates # See exchange rates
|
||||
wrangler # Cloudflare Workers CLI
|
||||
csview # Quick display CSV as tables
|
24
colorscheme/everforest/default.nix
Normal file
24
colorscheme/everforest/default.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
name = "everforest"; # dark, hard
|
||||
author = "Sainnhe Park";
|
||||
dark = {
|
||||
base00 = "#2b3339"; # Default Background
|
||||
base01 = "#323c41"; # Lighter Background
|
||||
base02 = "#503946"; # Selection Background
|
||||
base03 = "#868d80"; # Comments, Invisibles, Line Highlighting
|
||||
base04 = "#d3c6aa"; # Dark Foreground (Used for status bars)
|
||||
base05 = "#d3c6aa"; # Default Foreground, Caret, Delimiters, Operators
|
||||
base06 = "#e9e8d2"; # Light Foreground (Not often used)
|
||||
base07 = "#fff9e8"; # Light Background (Not often used)
|
||||
base08 = "#7fbbb3"; # Variables, XML Tags, Markup Link Text, ...
|
||||
base09 = "#d699b6"; # Integers, Boolean, Constants, ...
|
||||
base0A = "#83c092"; # Classes, Markup Bold, Search Text Background
|
||||
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
||||
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
||||
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
||||
base0E =
|
||||
"#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||
base0F =
|
||||
"#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
||||
};
|
||||
}
|
45
colorscheme/gruvbox-dark/default.nix
Normal file
45
colorscheme/gruvbox-dark/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
# Gruvbox with a darker background for greater contrast
|
||||
|
||||
{
|
||||
name = "gruvbox-dark"; # Dark, Medium
|
||||
author =
|
||||
"Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)";
|
||||
dark = {
|
||||
base00 = "#1D2122"; # ---- This is the change from normal gruvbox
|
||||
base01 = "#3c3836"; # ---
|
||||
base02 = "#504945"; # --
|
||||
base03 = "#665c54"; # -
|
||||
base04 = "#bdae93"; # +
|
||||
base05 = "#d5c4a1"; # ++
|
||||
base06 = "#ebdbb2"; # +++
|
||||
base07 = "#fbf1c7"; # ++++
|
||||
base08 = "#fb4934"; # red
|
||||
base09 = "#fe8019"; # orange
|
||||
base0A = "#fabd2f"; # yellow
|
||||
base0B = "#b8bb26"; # green
|
||||
base0C = "#8ec07c"; # aqua/cyan
|
||||
base0D = "#83a598"; # blue
|
||||
base0E = "#d3869b"; # purple
|
||||
base0F = "#d65d0e"; # brown
|
||||
batTheme = "gruvbox-dark";
|
||||
};
|
||||
light = {
|
||||
base00 = "#fbf1c7"; # ----
|
||||
base01 = "#ebdbb2"; # ---
|
||||
base02 = "#d5c4a1"; # --
|
||||
base03 = "#bdae93"; # -
|
||||
base04 = "#665c54"; # +
|
||||
base05 = "#504945"; # ++
|
||||
base06 = "#3c3836"; # +++
|
||||
base07 = "#1D2122"; # ++++ Adjusted darker here
|
||||
base08 = "#9d0006"; # red
|
||||
base09 = "#af3a03"; # orange
|
||||
base0A = "#b57614"; # yellow
|
||||
base0B = "#79740e"; # green
|
||||
base0C = "#427b58"; # aqua/cyan
|
||||
base0D = "#076678"; # blue
|
||||
base0E = "#8f3f71"; # purple
|
||||
base0F = "#d65d0e"; # brown
|
||||
batTheme = "gruvbox-light";
|
||||
};
|
||||
}
|
43
colorscheme/gruvbox/default.nix
Normal file
43
colorscheme/gruvbox/default.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
name = "gruvbox"; # Dark, Medium
|
||||
author =
|
||||
"Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)";
|
||||
dark = {
|
||||
base00 = "#282828"; # ----
|
||||
base01 = "#3c3836"; # ---
|
||||
base02 = "#504945"; # --
|
||||
base03 = "#665c54"; # -
|
||||
base04 = "#bdae93"; # +
|
||||
base05 = "#d5c4a1"; # ++
|
||||
base06 = "#ebdbb2"; # +++
|
||||
base07 = "#fbf1c7"; # ++++
|
||||
base08 = "#fb4934"; # red
|
||||
base09 = "#fe8019"; # orange
|
||||
base0A = "#fabd2f"; # yellow
|
||||
base0B = "#b8bb26"; # green
|
||||
base0C = "#8ec07c"; # aqua/cyan
|
||||
base0D = "#83a598"; # blue
|
||||
base0E = "#d3869b"; # purple
|
||||
base0F = "#d65d0e"; # brown
|
||||
batTheme = "gruvbox-dark";
|
||||
};
|
||||
light = {
|
||||
base00 = "#fbf1c7"; # ----
|
||||
base01 = "#ebdbb2"; # ---
|
||||
base02 = "#d5c4a1"; # --
|
||||
base03 = "#bdae93"; # -
|
||||
base04 = "#665c54"; # +
|
||||
base05 = "#504945"; # ++
|
||||
base06 = "#3c3836"; # +++
|
||||
base07 = "#282828"; # ++++
|
||||
base08 = "#9d0006"; # red
|
||||
base09 = "#af3a03"; # orange
|
||||
base0A = "#b57614"; # yellow
|
||||
base0B = "#79740e"; # green
|
||||
base0C = "#427b58"; # aqua/cyan
|
||||
base0D = "#076678"; # blue
|
||||
base0E = "#8f3f71"; # purple
|
||||
base0F = "#d65d0e"; # brown
|
||||
batTheme = "gruvbox-light";
|
||||
};
|
||||
}
|
23
colorscheme/nord/default.nix
Normal file
23
colorscheme/nord/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
name = "nord";
|
||||
author = "arcticicestudio";
|
||||
dark = {
|
||||
base00 = "#2E3440";
|
||||
base01 = "#3B4252";
|
||||
base02 = "#434C5E";
|
||||
base03 = "#4C566A";
|
||||
base04 = "#D8DEE9";
|
||||
base05 = "#E5E9F0";
|
||||
base06 = "#ECEFF4";
|
||||
base07 = "#8FBCBB";
|
||||
base08 = "#88C0D0";
|
||||
base09 = "#81A1C1";
|
||||
base0A = "#5E81AC";
|
||||
base0B = "#BF616A";
|
||||
base0C = "#D08770";
|
||||
base0D = "#EBCB8B";
|
||||
base0E = "#A3BE8C";
|
||||
base0F = "#B48EAD";
|
||||
batTheme = "nord";
|
||||
};
|
||||
}
|
42
disks/root.nix
Normal file
42
disks/root.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ disk, ... }: {
|
||||
disk = {
|
||||
boot = {
|
||||
type = "disk";
|
||||
device = disk;
|
||||
content = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
# Boot partition
|
||||
{
|
||||
name = "ESP";
|
||||
start = "0";
|
||||
end = "512MiB";
|
||||
fs-type = "fat32";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
extraArgs = [ "-n boot" ];
|
||||
};
|
||||
}
|
||||
# Root partition ext4
|
||||
{
|
||||
name = "root";
|
||||
start = "512MiB";
|
||||
end = "100%";
|
||||
part-type = "primary";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
extraArgs = [ "-L nixos" ];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
95
disks/zfs.nix
Normal file
95
disks/zfs.nix
Normal file
@ -0,0 +1,95 @@
|
||||
{ pool, disks, ... }: {
|
||||
disk = lib.genAttrs disks (disk: {
|
||||
"${disk}" = {
|
||||
type = "disk";
|
||||
device = "/dev/${disk}";
|
||||
content = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [{
|
||||
type = "partition";
|
||||
name = "zfs";
|
||||
start = "128MiB";
|
||||
end = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = pool;
|
||||
};
|
||||
}];
|
||||
};
|
||||
};
|
||||
});
|
||||
zpool = {
|
||||
"${pool}" = {
|
||||
type = "zpool";
|
||||
mode = "raidz1";
|
||||
rootFsOptions = {
|
||||
compression = "on"; # lz4 by default
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
ashift = "12";
|
||||
};
|
||||
# mountpoint = "/";
|
||||
|
||||
datasets = {
|
||||
root = {
|
||||
zfs_type = "filesystem";
|
||||
mountpoint = null;
|
||||
options."com.sun:auto-snapshot" = "false";
|
||||
};
|
||||
# "media/movies" = {
|
||||
# zfs_type = "filesystem";
|
||||
# mountpoint = "/media/movies";
|
||||
# options.recordsize = "1M";
|
||||
# };
|
||||
# "media/tv" = {
|
||||
# zfs_type = "filesystem";
|
||||
# mountpoint = "/media/tv";
|
||||
# options.recordsize = "1M";
|
||||
# };
|
||||
# "media/books" = {
|
||||
# zfs_type = "filesystem";
|
||||
# mountpoint = "/media/books";
|
||||
# };
|
||||
# archive = {
|
||||
# zfs_type = "filesystem";
|
||||
# mountpoint = "/archive";
|
||||
# options.compression = "zstd";
|
||||
# options."com.sun:auto-snapshot" = "true";
|
||||
# };
|
||||
# zfs_unmounted_fs = {
|
||||
# zfs_type = "filesystem";
|
||||
# options.mountpoint = "none";
|
||||
# };
|
||||
# zfs_legacy_fs = {
|
||||
# zfs_type = "filesystem";
|
||||
# options.mountpoint = "legacy";
|
||||
# mountpoint = "/zfs_legacy_fs";
|
||||
# };
|
||||
# zfs_testvolume = {
|
||||
# zfs_type = "volume";
|
||||
# size = "10M";
|
||||
# content = {
|
||||
# type = "filesystem";
|
||||
# format = "ext4";
|
||||
# mountpoint = "/ext4onzfs";
|
||||
# };
|
||||
# };
|
||||
# encrypted = {
|
||||
# zfs_type = "filesystem";
|
||||
# size = "20M";
|
||||
# options = {
|
||||
# mountpoint = "none";
|
||||
# encryption = "aes-256-gcm";
|
||||
# keyformat = "passphrase";
|
||||
# keylocation = "file:///tmp/secret.key";
|
||||
# };
|
||||
# };
|
||||
# "encrypted/test" = {
|
||||
# zfs_type = "filesystem";
|
||||
# size = "2M";
|
||||
# mountpoint = "/zfs_crypted";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
67
docs/installation.md
Normal file
67
docs/installation.md
Normal file
@ -0,0 +1,67 @@
|
||||
[Back to README](../README.md)
|
||||
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
## NixOS - From Live Disk
|
||||
|
||||
Format drives and build system from any NixOS host, including the live
|
||||
installer disk:
|
||||
|
||||
**This will erase your drives; use at your own risk!**
|
||||
|
||||
```bash
|
||||
lsblk # Choose the disk you want to wipe
|
||||
nix-shell -p nixVersions.stable
|
||||
nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest
|
||||
```
|
||||
|
||||
## NixOS - From Existing System
|
||||
|
||||
If you're already running NixOS, you can switch to this configuration with the
|
||||
following command:
|
||||
|
||||
```bash
|
||||
nix-shell -p nixVersions.stable
|
||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#tempest
|
||||
```
|
||||
|
||||
## Windows - From NixOS WSL
|
||||
|
||||
After [installing NixOS on
|
||||
WSL](https://xeiaso.net/blog/nix-flakes-4-wsl-2022-05-01), you can switch to
|
||||
the WSL configuration:
|
||||
|
||||
```
|
||||
nix-shell -p nixVersions.stable
|
||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#hydra
|
||||
```
|
||||
|
||||
You should also download the
|
||||
[FiraCode](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/FiraCode.zip)
|
||||
font and install it on Windows. Install [Alacritty](https://alacritty.org/) and
|
||||
move the `windows/alacritty.yml` file to
|
||||
`C:\Users\<user>\AppData\Roaming\alacritty`.
|
||||
|
||||
## macOS
|
||||
|
||||
To get started on a bare macOS installation, first install Nix:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl -L https://nixos.org/nix/install)"
|
||||
```
|
||||
|
||||
Then use Nix to build nix-darwin:
|
||||
|
||||
```bash
|
||||
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
|
||||
./result/bin/darwin-installer
|
||||
```
|
||||
|
||||
Then switch to the macOS configuration:
|
||||
|
||||
```bash
|
||||
darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
|
||||
```
|
||||
|
23
docs/restore-calibre.md
Normal file
23
docs/restore-calibre.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Restoring Calibre From Backup
|
||||
|
||||
The `metadata.db` holds the library and `app.db` and `gdrive.db` contain the
|
||||
web/account information.
|
||||
|
||||
Place books directories in `/data/books/`.
|
||||
|
||||
Place `metadata.db` in `/var/lib/calibre-web-db/`.
|
||||
|
||||
Symlink `metadata.db` to the library:
|
||||
|
||||
```
|
||||
sudo ln -s /var/lib/calibre-web-db/metadata.db /data/books/metadata.db
|
||||
```
|
||||
|
||||
Place `app.db` and `gdrive.db` in `/var/lib/calibre-web/`.
|
||||
|
||||
Restart Calibre:
|
||||
|
||||
```
|
||||
sudo systemctl restart calibre-web.service
|
||||
```
|
||||
|
43
docs/restore-nextcloud.md
Normal file
43
docs/restore-nextcloud.md
Normal file
@ -0,0 +1,43 @@
|
||||
# Restoring Nextcloud From Backup
|
||||
|
||||
Install the `litestream` package.
|
||||
|
||||
```
|
||||
nix-shell --run fish -p litestream
|
||||
```
|
||||
|
||||
Set the S3 credentials:
|
||||
|
||||
```
|
||||
set -x AWS_ACCESS_KEY_ID (read)
|
||||
set -x AWS_SECRET_ACCESS_KEY (read)
|
||||
```
|
||||
|
||||
Restore from S3:
|
||||
|
||||
```
|
||||
litestream restore -o nextcloud.db s3://noahmasur-backup.s3.us-west-002.backblazeb2.com/nextcloud
|
||||
```
|
||||
|
||||
Install Nextcloud. Then copy DB:
|
||||
|
||||
```
|
||||
sudo rm /data/nextcloud/data/nextcloud.db*
|
||||
sudo mv nextcloud.db /data/nextcloud/data/
|
||||
sudo chown nextcloud:nextcloud /data/nextcloud/data/nextcloud.db
|
||||
sudo chmod 770 /data/nextcloud/data/nextcloud.db
|
||||
```
|
||||
|
||||
Restart Nextcloud:
|
||||
|
||||
```
|
||||
sudo systemctl restart phpfpm-nextcloud.service
|
||||
```
|
||||
|
||||
Adjust Permissions and Directories:
|
||||
|
||||
```
|
||||
sudo mkdir /data/nextcloud/data/noah/files
|
||||
sudo chown nextcloud:nextcloud /data/nextcloud/data/noah/files
|
||||
```
|
||||
|
@ -1,8 +0,0 @@
|
||||
!.env*
|
||||
!.github/
|
||||
!.gitignore
|
||||
!*.tfvars
|
||||
.terraform/
|
||||
.target/
|
||||
/Library/
|
||||
target
|
@ -1,9 +0,0 @@
|
||||
|
||||
function __complete_nomad
|
||||
set -lx COMP_LINE (commandline -cp)
|
||||
test -z (commandline -ct)
|
||||
and set COMP_LINE "$COMP_LINE "
|
||||
/usr/local/bin/nomad
|
||||
end
|
||||
complete -f -c nomad -a "(__complete_nomad)"
|
||||
|
@ -1,138 +0,0 @@
|
||||
# Setup Nix
|
||||
|
||||
# We need to distinguish between single-user and multi-user installs.
|
||||
# This is difficult because there's no official way to do this.
|
||||
# We could look for the presence of /nix/var/nix/daemon-socket/socket but this will fail if the
|
||||
# daemon hasn't started yet. /nix/var/nix/daemon-socket will exist if the daemon has ever run, but
|
||||
# I don't think there's any protection against accidentally running `nix-daemon` as a user.
|
||||
# We also can't just look for /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh because
|
||||
# older single-user installs used the default profile instead of a per-user profile.
|
||||
# We can still check for it first, because all multi-user installs should have it, and so if it's
|
||||
# not present that's a pretty big indicator that this is a single-user install. If it does exist,
|
||||
# we still need to verify the install type. To that end we'll look for a root owner and sticky bit
|
||||
# on /nix/store. Multi-user installs set both, single-user installs don't. It's certainly possible
|
||||
# someone could do a single-user install as root and then manually set the sticky bit but that
|
||||
# would be extremely unusual.
|
||||
|
||||
set -l nix_profile_path /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
set -l single_user_profile_path ~/.nix-profile/etc/profile.d/nix.sh
|
||||
if test -e $nix_profile_path
|
||||
# The path exists. Double-check that this is a multi-user install.
|
||||
# We can't just check for ~/.nix-profile/… because this may be a single-user install running as
|
||||
# the wrong user.
|
||||
|
||||
# stat is not portable. Splitting the output of ls -nd is reliable on most platforms.
|
||||
set -l owner (string split -n ' ' (ls -nd /nix/store 2>/dev/null))[3]
|
||||
if not test -k /nix/store -a $owner -eq 0
|
||||
# /nix/store is either not owned by root or not sticky. Assume single-user.
|
||||
set nix_profile_path $single_user_profile_path
|
||||
end
|
||||
else
|
||||
# The path doesn't exist. Assume single-user
|
||||
set nix_profile_path $single_user_profile_path
|
||||
end
|
||||
|
||||
if test -e $nix_profile_path
|
||||
# Source the nix setup script
|
||||
# We're going to run the regular Nix profile under bash and then print out a few variables
|
||||
for line in (env -u BASH_ENV bash -c '. "$0"; for name in PATH "${!NIX_@}"; do printf "%s=%s\0" "$name" "${!name}"; done' $nix_profile_path | string split0)
|
||||
set -xg (string split -m 1 = $line)
|
||||
end
|
||||
|
||||
# Insert Nix's fish share directories into fish's special variables.
|
||||
# nixpkgs-installed fish tries to set these up already if NIX_PROFILES is defined, which won't
|
||||
# be the case when sourcing $__fish_data_dir/share/config.fish normally, but might be for a
|
||||
# recursive invocation. To guard against that, we'll only insert paths that don't already exit.
|
||||
# Furthermore, for the vendor_conf.d sourcing, we'll use the pre-existing presence of a path in
|
||||
# $fish_function_path to determine whether we want to source the relevant vendor_conf.d folder.
|
||||
|
||||
# To start, let's locally define NIX_PROFILES if it doesn't already exist.
|
||||
set -al NIX_PROFILES
|
||||
if test (count $NIX_PROFILES) -eq 0
|
||||
set -a NIX_PROFILES $HOME/.nix-profile
|
||||
end
|
||||
# Replicate the logic from nixpkgs version of $__fish_data_dir/__fish_build_paths.fish.
|
||||
set -l __nix_profile_paths (string split ' ' -- $NIX_PROFILES)[-1..1]
|
||||
set -l __extra_completionsdir \
|
||||
$__nix_profile_paths/etc/fish/completions \
|
||||
$__nix_profile_paths/share/fish/vendor_completions.d
|
||||
set -l __extra_functionsdir \
|
||||
$__nix_profile_paths/etc/fish/functions \
|
||||
$__nix_profile_paths/share/fish/vendor_functions.d
|
||||
set -l __extra_confdir \
|
||||
$__nix_profile_paths/etc/fish/conf.d \
|
||||
$__nix_profile_paths/share/fish/vendor_conf.d \
|
||||
|
||||
### Configure fish_function_path ###
|
||||
# Remove any of our extra paths that may already exist.
|
||||
# Record the equivalent __extra_confdir path for any function path that exists.
|
||||
set -l existing_conf_paths
|
||||
for path in $__extra_functionsdir
|
||||
if set -l idx (contains --index -- $path $fish_function_path)
|
||||
set -e fish_function_path[$idx]
|
||||
set -a existing_conf_paths $__extra_confdir[(contains --index -- $path $__extra_functionsdir)]
|
||||
end
|
||||
end
|
||||
# Insert the paths before $__fish_data_dir.
|
||||
if set -l idx (contains --index -- $__fish_data_dir/functions $fish_function_path)
|
||||
# Fish has no way to simply insert into the middle of an array.
|
||||
set -l new_path $fish_function_path[1..$idx]
|
||||
set -e new_path[$idx]
|
||||
set -a new_path $__extra_functionsdir
|
||||
set fish_function_path $new_path $fish_function_path[$idx..-1]
|
||||
else
|
||||
set -a fish_function_path $__extra_functionsdir
|
||||
end
|
||||
|
||||
### Configure fish_complete_path ###
|
||||
# Remove any of our extra paths that may already exist.
|
||||
for path in $__extra_completionsdir
|
||||
if set -l idx (contains --index -- $path $fish_complete_path)
|
||||
set -e fish_complete_path[$idx]
|
||||
end
|
||||
end
|
||||
# Insert the paths before $__fish_data_dir.
|
||||
if set -l idx (contains --index -- $__fish_data_dir/completions $fish_complete_path)
|
||||
set -l new_path $fish_complete_path[1..$idx]
|
||||
set -e new_path[$idx]
|
||||
set -a new_path $__extra_completionsdir
|
||||
set fish_complete_path $new_path $fish_complete_path[$idx..-1]
|
||||
else
|
||||
set -a fish_complete_path $__extra_completionsdir
|
||||
end
|
||||
|
||||
### Source conf directories ###
|
||||
# The built-in directories were already sourced during shell initialization.
|
||||
# Any __extra_confdir that came from $__fish_data_dir/__fish_build_paths.fish was also sourced.
|
||||
# As explained above, we're using the presence of pre-existing paths in $fish_function_path as a
|
||||
# signal that the corresponding conf dir has also already been sourced.
|
||||
# In order to simulate this, we'll run through the same algorithm as found in
|
||||
# $__fish_data_dir/config.fish except we'll avoid sourcing the file if it comes from an
|
||||
# already-sourced location.
|
||||
# Caveats:
|
||||
# * Files will be sourced in a different order than we'd ideally do (because we're coming in
|
||||
# after the fact to source them).
|
||||
# * If there are existing extra conf paths, files in them may have been sourced that should have
|
||||
# been suppressed by paths we're inserting in front.
|
||||
# * Similarly any files in $__fish_data_dir/vendor_conf.d that should have been suppressed won't
|
||||
# have been.
|
||||
set -l sourcelist
|
||||
for file in $__fish_config_dir/conf.d/*.fish $__fish_sysconf_dir/conf.d/*.fish
|
||||
# We know these paths were sourced already. Just record them.
|
||||
set -l basename (string replace -r '^.*/' '' -- $file)
|
||||
contains -- $basename $sourcelist
|
||||
or set -a sourcelist $basename
|
||||
end
|
||||
for root in $__extra_confdir
|
||||
for file in $root/*.fish
|
||||
set -l basename (string replace -r '^.*/' '' -- $file)
|
||||
contains -- $basename $sourcelist
|
||||
and continue
|
||||
set -a sourcelist $basename
|
||||
contains -- $root $existing_conf_paths
|
||||
and continue # this is a pre-existing path, it will have been sourced already
|
||||
[ -f $file -a -r $file ]
|
||||
and source $file
|
||||
end
|
||||
end
|
||||
end
|
@ -1,41 +0,0 @@
|
||||
#!/usr/local/bin/fish
|
||||
|
||||
if status --is-interactive
|
||||
|
||||
# Add directories to path
|
||||
set PATH $PATH \
|
||||
/usr/local/bin \
|
||||
~/.local/bin \
|
||||
$DOTS/bin \
|
||||
~/.cargo/bin
|
||||
|
||||
# Use `vi` in the shell with cursor shapes
|
||||
fish_vi_key_bindings
|
||||
bind yy fish_clipboard_copy
|
||||
bind Y fish_clipboard_copy
|
||||
bind -M visual y fish_clipboard_copy
|
||||
bind p fish_clipboard_paste
|
||||
set -g fish_vi_force_cursor
|
||||
set -g fish_cursor_default block
|
||||
set -g fish_cursor_insert line
|
||||
set -g fish_cursor_visual block
|
||||
set -g fish_cursor_replace_one underscore
|
||||
fish_vi_cursor
|
||||
|
||||
# Autojump
|
||||
zoxide init fish | source
|
||||
|
||||
# Colors
|
||||
if test -e $DOTS/fish.configlink/fish_colors
|
||||
command cat $DOTS/fish.configlink/fish_colors
|
||||
end
|
||||
|
||||
# Fuzzy finder
|
||||
fzf_key_bindings
|
||||
set -gx FZF_DEFAULT_COMMAND 'fd --type file'
|
||||
set -g FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||
set -g FZF_DEFAULT_OPTS '-m --height 50% --border'
|
||||
|
||||
# Use `starship` prompt
|
||||
starship init fish | source
|
||||
end
|
@ -1 +0,0 @@
|
||||
]4;1;rgb:cc/24/1d]4;2;rgb:98/97/1a]4;3;rgb:d7/99/21]4;4;rgb:45/85/88]4;5;rgb:b1/62/86]4;6;rgb:68/9d/6a]11;rgb:28/28/28]10;rgb:eb/db/b2]4;0;rgb:28/28/28]4;7;rgb:a8/99/84]4;8;rgb:92/83/74]4;9;rgb:fb/59/34]4;10;rgb:b8/bb/26]4;11;rgb:fa/bd/2f]4;12;rgb:83/a5/98]4;13;rgb:d3/86/9b]4;14;rgb:8e/c0/7c]4;15;rgb:eb/db/b2]4;236;rgb:32/30/2f]4;234;rgb:1d/20/21]4;235;rgb:28/28/28]4;237;rgb:3c/38/36]4;239;rgb:50/49/45]4;241;rgb:66/5c/54]4;243;rgb:7c/6f/64]4;244;rgb:92/83/74]4;245;rgb:92/83/74]4;228;rgb:f2/e5/bc]4;230;rgb:f9/f5/d7]4;229;rgb:fb/f1/c7]4;223;rgb:eb/db/b2]4;250;rgb:d5/c4/a1]4;248;rgb:bd/ae/93]4;246;rgb:a8/99/84]4;167;rgb:fb/49/34]4;142;rgb:b8/bb/26]4;214;rgb:fa/bd/2f]4;109;rgb:83/a5/98]4;175;rgb:d3/86/9b]4;108;rgb:8e/c0/7c]4;208;rgb:fe/80/19]4;88;rgb:9d/00/06]4;100;rgb:79/74/0e]4;136;rgb:b5/76/14]4;24;rgb:07/66/78]4;96;rgb:8f/3f/71]4;66;rgb:42/7b/58]4;130;rgb:af/3a/03
|
@ -1,143 +0,0 @@
|
||||
#!/usr/local/bin/fish
|
||||
|
||||
function abbrs --description 'All abbreviations'
|
||||
|
||||
# Directory aliases
|
||||
abbr -a l 'ls'
|
||||
abbr -a lh 'ls -lh'
|
||||
abbr -a ll 'ls -alhF'
|
||||
abbr -a lf 'ls -lh | fzf'
|
||||
abbr -a c 'cd'
|
||||
abbr -a -- - 'cd -'
|
||||
abbr -a proj 'cd $PROJ'
|
||||
abbr -a mkd 'mkdir -pv'
|
||||
|
||||
# Tmux
|
||||
abbr -a ta 'tmux attach-session'
|
||||
abbr -a tan 'tmux attach-session -t noah'
|
||||
abbr -a tnn 'tmux new-session -s noah'
|
||||
|
||||
# Git
|
||||
abbr -a g 'git'
|
||||
abbr -a gs 'git status'
|
||||
abbr -a gd 'git diff'
|
||||
abbr -a gds 'git diff --staged'
|
||||
abbr -a gdp 'git diff HEAD^'
|
||||
abbr -a ga 'git add'
|
||||
abbr -a gaa 'git add -A'
|
||||
abbr -a gac 'git commit -am'
|
||||
abbr -a gc 'git commit -m'
|
||||
abbr -a gca 'git commit --amend'
|
||||
abbr -a gu 'git pull'
|
||||
abbr -a gp 'git push'
|
||||
abbr -a gpp 'git_set_upstream'
|
||||
abbr -a gl 'git log --graph --decorate --oneline -20'
|
||||
abbr -a gll 'git log --graph --decorate --oneline'
|
||||
abbr -a gco 'git checkout'
|
||||
abbr -a gcom 'git checkout master'
|
||||
abbr -a gcob 'git checkout -b'
|
||||
abbr -a gb 'git branch'
|
||||
abbr -a gbd 'git branch -d'
|
||||
abbr -a gbD 'git branch -D'
|
||||
abbr -a gr 'git reset'
|
||||
abbr -a grh 'git reset --hard'
|
||||
abbr -a gm 'git merge'
|
||||
abbr -a gcp 'git cherry-pick'
|
||||
abbr -a cdg 'cd (git rev-parse --show-toplevel)'
|
||||
|
||||
# GitHub
|
||||
abbr -a ghr 'gh repo view -w'
|
||||
abbr -a gha 'gh run list | head -1 | awk \'{ print $NF }\' | xargs gh run view'
|
||||
abbr -a grw 'gh run watch'
|
||||
abbr -a grf 'gh run view --log-failed'
|
||||
abbr -a grl 'gh run view --log'
|
||||
|
||||
# Vim
|
||||
if command -v nvim > /dev/null
|
||||
alias --save vim='nvim'
|
||||
abbr -a vimrc 'vim $HOME/.config/nvim/init.lua'
|
||||
else
|
||||
alias --save vim='vim'
|
||||
abbr -a vimrc 'vim $HOME/.vimrc'
|
||||
end
|
||||
abbr -a v 'vim'
|
||||
abbr -a vl 'vim -c "normal! `0"'
|
||||
abbr -a vll 'vim -c "Hist"'
|
||||
|
||||
# Notes
|
||||
abbr -a qn 'quicknote'
|
||||
abbr -a sn 'syncnotes'
|
||||
abbr -a work 'vim $NOTES_PATH/work.md'
|
||||
|
||||
# Improved CLI Tools
|
||||
abbr -a cat 'bat' # Swap cat with bat
|
||||
abbr -a h 'http -Fh --all' # Curl site for headers
|
||||
|
||||
# Fun CLI Tools
|
||||
abbr goo 'googler'
|
||||
abbr gooj 'googler -j'
|
||||
abbr weather 'curl wttr.in/$WEATHER_CITY'
|
||||
abbr moon 'curl wttr.in/Moon'
|
||||
|
||||
# Dotfile and config shortcuts
|
||||
abbr -a s 'sudo'
|
||||
abbr -a boot '$DOTS/scripts/bootstrap'
|
||||
abbr -a sshc 'vim ~/.ssh/config'
|
||||
abbr -a hosts 'sudo nvim /etc/hosts'
|
||||
abbr -a frc 'vim $HOME/.config/fish/config.fish'
|
||||
abbr -a falias 'vim $HOME/.config/fish/functions/abbrs.fish'
|
||||
|
||||
# Cheat Sheets
|
||||
abbr -a ssl 'openssl req -new -newkey rsa:2048 -nodes' \
|
||||
'-keyout server.key -out server.csr'
|
||||
abbr -a fingerprint 'ssh-keyscan myhost.com | ssh-keygen -lf -'
|
||||
abbr -a publickey 'ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub'
|
||||
abbr -a forloop 'for i in (seq 1 100)'
|
||||
abbr -a gatekeeper 'sudo spctl --master-disable'
|
||||
|
||||
# Docker
|
||||
abbr -a dc '$DOTS/bin/docker_cleanup'
|
||||
abbr -a dr 'docker run --rm -it'
|
||||
abbr -a db 'docker build . -t'
|
||||
abbr -a ds 'docker ps -a'
|
||||
abbr -a de 'docker exec -it'
|
||||
abbr -a dpy 'docker run --rm -it -v $PWD:/project python:alpine python'
|
||||
abbr -a alp 'docker run --rm -it -v $PWD:/project alpine sh'
|
||||
|
||||
# Terraform
|
||||
abbr -a te 'terraform'
|
||||
abbr -a tap 'terraform apply'
|
||||
|
||||
# Kubernetes
|
||||
abbr -a k 'kubectl'
|
||||
abbr -a pods 'kubectl get pods -A'
|
||||
abbr -a nodes 'kubectl get nodes'
|
||||
abbr -a deploys 'kubectl get deployments -A'
|
||||
abbr -a dash 'kube-dashboard'
|
||||
abbr -a ks 'k9s'
|
||||
|
||||
# Cloud
|
||||
abbr -a awsc 'vim ~/.aws/credentials'
|
||||
|
||||
# Python
|
||||
abbr -a py 'python'
|
||||
abbr -a po 'poetry'
|
||||
abbr -a pr 'poetry run python'
|
||||
abbr -a pl 'poetry run pylint *'
|
||||
abbr -a black 'poetry run black --target-version py38 .'
|
||||
abbr -a bl 'poetry run black --target-version py38 .'
|
||||
|
||||
# Rust
|
||||
abbr -a ca 'cargo'
|
||||
|
||||
# macOS
|
||||
abbr -a casks 'vim $DOTS/homebrew/Caskfile'
|
||||
abbr -a t 'trash'
|
||||
|
||||
# Linux
|
||||
if [ (uname) = "Linux" ]
|
||||
linux
|
||||
end
|
||||
|
||||
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
function brews --description "Open Homebrew bundles file"
|
||||
set -lx brewdir $DOTS/homebrew
|
||||
set -l brewfile (basename $brewdir/*.Brewfile \
|
||||
| fzf \
|
||||
--height 70% \
|
||||
--preview-window right:70% \
|
||||
--preview 'bat --color=always $brewdir/{}' \
|
||||
)
|
||||
and vim $brewdir/$brewfile
|
||||
end
|
@ -1,9 +0,0 @@
|
||||
function brewsearch --description "Install brew plugins"
|
||||
set -l inst (brew formulae | eval "fzf $FZF_DEFAULT_OPTS -m --header='[press ctrl-i for info, enter to install]' --bind 'ctrl-i:preview(brew info {})'")
|
||||
|
||||
if not test (count $inst) = 0
|
||||
for prog in $inst
|
||||
brew install "$prog"
|
||||
end
|
||||
end
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
#!/usr/local/bin/fish
|
||||
|
||||
function commandline-git-commits
|
||||
set commit (git-commits)
|
||||
if [ $commit ]
|
||||
commandline -i "$commit"
|
||||
else
|
||||
commandline -i "HEAD"
|
||||
end
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function copy --description 'Copy file contents into clipboard'
|
||||
cat $argv | pbcopy
|
||||
end
|
@ -1,6 +0,0 @@
|
||||
function edit --description "Open a file in Vim"
|
||||
set vimfile (fzf)
|
||||
and set vimfile (echo $vimfile | tr -d '\r')
|
||||
and commandline -r "vim $vimfile"
|
||||
and commandline -f execute
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function envs --description 'Set from a bash environment variables file'
|
||||
set -gx (cat $argv | tr "=" " " | string split ' ')
|
||||
end
|
@ -1,11 +0,0 @@
|
||||
function fcd --description 'Jump to directory' -a 'directory'
|
||||
if test -z $directory
|
||||
set directory "$HOME"
|
||||
end
|
||||
if ! test -d $directory
|
||||
echo "Directory not found: $directory"
|
||||
return 1
|
||||
end
|
||||
set jump (fd -t d . $directory | fzf)
|
||||
and cd $jump $argv;
|
||||
end
|
@ -1,9 +0,0 @@
|
||||
#!/usr/local/bin/fish
|
||||
|
||||
function fish_user_key_bindings
|
||||
bind -M insert \co 'edit'
|
||||
bind -M insert \ce 'recent'
|
||||
bind -M insert \cg 'commandline-git-commits'
|
||||
bind -M insert \x1F accept-autosuggestion
|
||||
bind -M default \x1F accept-autosuggestion
|
||||
end
|
@ -1 +0,0 @@
|
||||
/usr/local/opt/fzf/shell/key-bindings.fish
|
@ -1,8 +0,0 @@
|
||||
# This function creates an output file of just the printf values for
|
||||
# modifying the shell colors. This output file is used to load the
|
||||
# current colors into my shell much faster than running the function on
|
||||
# prompt.
|
||||
|
||||
function generate_fish_colors --description "Create fish colors file"
|
||||
theme_gruvbox dark > $DOTS/fish.configlink/fish_colors
|
||||
end
|
@ -1,15 +0,0 @@
|
||||
function git-add-fuzzy
|
||||
set gitfile (git status -s \
|
||||
| fzf \
|
||||
--height 50% \
|
||||
-m \
|
||||
--preview-window right:70% \
|
||||
--preview 'set -l IFS; set gd (git diff --color=always (echo {} | awk \'{$1=$1};1\' | cut -d" " -f2)); if test "$gd"; echo "$gd"; else; bat --color=always (echo {} | awk \'{$1=$1};1\' | cut -d" " -f2); end')
|
||||
and for gf in $gitfile
|
||||
set gf (echo $gf \
|
||||
| awk '{$1=$1};1' \
|
||||
| cut -d' ' -f2 \
|
||||
)
|
||||
and git add $gf
|
||||
end
|
||||
end
|
@ -1,4 +0,0 @@
|
||||
function git-checkout-fuzzy
|
||||
set branch (git-fuzzy-branch "checkout branch...")
|
||||
and git checkout $branch
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
function git-commits
|
||||
set commitline (git log \
|
||||
--pretty="format:%C(auto)%ar %h%d %s" \
|
||||
| fzf \
|
||||
--height 50% \
|
||||
--preview 'git show --color=always (echo {} | cut -d" " -f4)' \
|
||||
)
|
||||
and set commit (echo $commitline | cut -d" " -f4)
|
||||
and echo $commit
|
||||
end
|
@ -1,4 +0,0 @@
|
||||
function git-delete-fuzzy
|
||||
set branch (git-fuzzy-branch "delete branch...")
|
||||
and git branch -d $branch
|
||||
end
|
@ -1,4 +0,0 @@
|
||||
function git-force-delete-fuzzy
|
||||
set branch (git-fuzzy-branch "force delete branch...")
|
||||
and git branch -D $branch
|
||||
end
|
@ -1,12 +0,0 @@
|
||||
function git-fuzzy-branch -a header
|
||||
set -l current (git rev-parse --abbrev-ref HEAD | tr -d '\n')
|
||||
set -l branch (git branch \
|
||||
--format "%(refname:short)" \
|
||||
| fzf \
|
||||
--height 50% \
|
||||
--header="On $current, $header" \
|
||||
--preview-window right:70% \
|
||||
--preview 'git log {} --color=always --pretty="format:%C(auto)%ar %h%d %s"' \
|
||||
)
|
||||
and echo $branch
|
||||
end
|
@ -1,16 +0,0 @@
|
||||
function git-history
|
||||
if not count $argv > /dev/null
|
||||
echo "Must provide filename."
|
||||
return 1
|
||||
end
|
||||
set commitline ( git log \
|
||||
--follow \
|
||||
--pretty="format:%C(auto)%ar %h%d %s" \
|
||||
-- ./$argv \
|
||||
| fzf \
|
||||
--height 100% \
|
||||
--preview "git diff --color=always (echo {} | cut -d' ' -f4)^1..(echo {} | cut -d' ' -f4) -- ./$argv" \
|
||||
)
|
||||
and set commit (echo $commitline | cut -d" " -f4)
|
||||
and echo $commit
|
||||
end
|
@ -1,4 +0,0 @@
|
||||
function git-merge-fuzzy
|
||||
set branch (git-fuzzy-branch "merge from...")
|
||||
and git merge $branch
|
||||
end
|
@ -1,8 +0,0 @@
|
||||
function git-show-fuzzy
|
||||
set commitline (git log \
|
||||
--pretty="format:%C(auto)%ar %h%d %s" \
|
||||
| fzf \
|
||||
)
|
||||
and set commit (echo $commitline | cut -d" " -f4 )
|
||||
and git show $commit
|
||||
end
|
@ -1,39 +0,0 @@
|
||||
function git
|
||||
if contains f $argv
|
||||
switch $argv[1]
|
||||
case "checkout"
|
||||
git-checkout-fuzzy
|
||||
case "add"
|
||||
git-add-fuzzy
|
||||
case "show"
|
||||
git-show-fuzzy
|
||||
case "merge"
|
||||
git-merge-fuzzy
|
||||
case "branch"
|
||||
if test "$argv[2]" = "-d"
|
||||
git-delete-fuzzy
|
||||
else if test "$argv[2]" = "-D"
|
||||
git-force-delete-fuzzy
|
||||
else
|
||||
echo "Not a fuzzy option."
|
||||
return 1
|
||||
end
|
||||
case "reset"
|
||||
set commit (git-commits)
|
||||
and if test "$argv[2]" = "--hard"
|
||||
git reset --hard $commit
|
||||
else
|
||||
git reset $commit
|
||||
end
|
||||
case "*"
|
||||
echo "No fuzzy option."
|
||||
return 1
|
||||
end
|
||||
else
|
||||
if count $argv > /dev/null
|
||||
command git $argv
|
||||
else
|
||||
command git status -sb
|
||||
end
|
||||
end
|
||||
end
|
@ -1,7 +0,0 @@
|
||||
function ip
|
||||
if count $argv > /dev/null
|
||||
curl ipinfo.io/$argv
|
||||
else
|
||||
curl checkip.amazonaws.com
|
||||
end
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
function journal --description "Create today's journal"
|
||||
note-dates
|
||||
if [ -f $TODAY_NOTE_FILE ]
|
||||
echo "Already exists."
|
||||
else
|
||||
note-header
|
||||
printf $JOURNAL_HEADER > $TODAY_NOTE_FILE
|
||||
echo "New journal added."
|
||||
end
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function json --description "Tidy up JSON with jq"
|
||||
pbpaste | jq '.' | pbcopy
|
||||
end
|
@ -1,4 +0,0 @@
|
||||
function linux --description "Load only on Linux"
|
||||
alias pbcopy='xclip -selection clipboard -in'
|
||||
alias pbpaste='xclip -selection clipboard -out'
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function ls --description "Use exa to list files"
|
||||
exa $argv
|
||||
end
|
@ -1,11 +0,0 @@
|
||||
function meeting --description "Describe a meeting" -a "name"
|
||||
note-dates
|
||||
set today_date (date -j +"%Y-%m-%d")
|
||||
set time (date +"%I:%M%p" | tr '[:upper:]' '[:lower:]')
|
||||
set meeting_name (echo $name | tr ' ' '-' | tr '[:upper:]' '[:lower:]')
|
||||
set meeting_note $today_date-$meeting_name
|
||||
set meeting_file meetings/$meeting_note.md
|
||||
printf "[$TODAY_NOTE](../journal/$TODAY_NOTE.md) | #meeting\n\n# $name\n\n---\n\n" > $NOTES_PATH/$meeting_file
|
||||
printf "\n\n---\n\n$time - [$name](../$meeting_file)\n\n---\n\n" >> $TODAY_NOTE_FILE
|
||||
vim $NOTES_PATH/$meeting_file
|
||||
end
|
@ -1,7 +0,0 @@
|
||||
function note-dates
|
||||
set -g TODAY_NOTE (date +"%Y-%m-%d_%a")
|
||||
set -g YESTERDAY_NOTE (date -jv "-1d" +"%Y-%m-%d_%a")
|
||||
set -g TOMORROW_NOTE (date -jv "+1d" +"%Y-%m-%d_%a")
|
||||
set -g LONG_DATE (date +"%A, %B %e, %Y" | sed 's/ */ /g')
|
||||
set -g TODAY_NOTE_FILE $NOTES_PATH/journal/$TODAY_NOTE.md
|
||||
end
|
@ -1,4 +0,0 @@
|
||||
function note-header
|
||||
set -g CURRENT_WEATHER (curl -s "https://wttr.in/?format=1")
|
||||
set -g JOURNAL_HEADER "[Yesterday]($YESTERDAY_NOTE.md) | [Home](home.md) | [Tomorrow]($TOMORROW_NOTE.md)\n\n$LONG_DATE\n$CURRENT_WEATHER\n#journal\n\n---\n\n"
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
function note --description "Edit or create a note" -a "filename"
|
||||
if test -n "$filename"
|
||||
vim $NOTES_PATH/$filename.md
|
||||
else
|
||||
set file (ls $NOTES_PATH | fzf)
|
||||
if [ $status -eq 0 ]
|
||||
vim $NOTES_PATH/$file
|
||||
end
|
||||
end
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function ping --description "Improved ping" -a "target"
|
||||
prettyping --nolegend $target
|
||||
end
|
@ -1,4 +0,0 @@
|
||||
function prj --description "cd to a project"
|
||||
set projdir (ls $PROJ | fzf)
|
||||
and cd $PROJ/$projdir
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function psf --description "Search for open process" -a "process"
|
||||
ps aux | rg -v "$USER.*rg $argv" | rg $argv
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function qr
|
||||
qrencode $argv[1] -o /tmp/qr.png | open /tmp/qr.png
|
||||
end
|
@ -1,5 +0,0 @@
|
||||
function quicknote --description "Write a quick note" -a "note"
|
||||
note-dates
|
||||
set time (date +"%I:%M%p" | tr '[:upper:]' '[:lower:]')
|
||||
printf "\n\n---\n\n#### $time\n$note\n" >> $TODAY_NOTE_FILE
|
||||
end
|
@ -1,6 +0,0 @@
|
||||
function recent --description "Open a recent file in Vim"
|
||||
set vimfile (fd -t f --exec stat -f "%m%t%N" | sort -nr | cut -f2 | fzf)
|
||||
and set vimfile (echo $vimfile | tr -d '\r')
|
||||
and commandline -r "vim $vimfile"
|
||||
and commandline -f execute
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function reload --description "Reload fish configuration"
|
||||
source $DOTS/fish.configlink/config.fish
|
||||
end
|
@ -1,9 +0,0 @@
|
||||
function syncnotes --description "Full git commit on notes"
|
||||
set current_dir $PWD
|
||||
cd $NOTES_PATH
|
||||
git pull
|
||||
git add -A
|
||||
git commit -m "autosync"
|
||||
git push
|
||||
cd $current_dir
|
||||
end
|
@ -1,141 +0,0 @@
|
||||
#!/usr/bin/fish
|
||||
function theme_gruvbox --description 'Apply gruvbox theme'
|
||||
set -l mode 'light'
|
||||
if test (count $argv) -gt 0
|
||||
set mode $argv[1]
|
||||
end
|
||||
|
||||
set -g contrast 'medium'
|
||||
if test (count $argv) -gt 1
|
||||
set contrast $argv[2]
|
||||
end
|
||||
|
||||
switch $contrast
|
||||
case 'soft'
|
||||
case 'medium'
|
||||
case 'hard'
|
||||
case '*'
|
||||
set_color $fish_color_error
|
||||
echo 'Unknown contrast $contrast, choose soft, medium or hard'
|
||||
set_color $fish_color_normal
|
||||
return 1
|
||||
end
|
||||
|
||||
switch $mode
|
||||
case 'light'
|
||||
__theme_gruvbox_base
|
||||
__theme_gruvbox_light
|
||||
case 'dark'
|
||||
__theme_gruvbox_base
|
||||
__theme_gruvbox_dark
|
||||
case '*'
|
||||
set_color $fish_color_error
|
||||
echo 'Unknown mode $mode, choose light or dark'
|
||||
set_color $fish_color_normal
|
||||
return 1
|
||||
end
|
||||
__theme_gruvbox_palette
|
||||
return 0
|
||||
end
|
||||
|
||||
function __theme_gruvbox_base
|
||||
__printf_color 1 'cc/24/1d'
|
||||
__printf_color 2 '98/97/1a'
|
||||
__printf_color 3 'd7/99/21'
|
||||
__printf_color 4 '45/85/88'
|
||||
__printf_color 5 'b1/62/86'
|
||||
__printf_color 6 '68/9d/6a'
|
||||
end
|
||||
|
||||
function __theme_gruvbox_light
|
||||
set -l bg 'fb/f1/c7'
|
||||
switch $contrast
|
||||
case "soft"
|
||||
set bg 'f2/e5/bc'
|
||||
case "hard"
|
||||
set bg 'f9/f5/d7'
|
||||
end
|
||||
command printf "\033]11;rgb:$bg\007"
|
||||
|
||||
set -l fg '3c/38/36'
|
||||
command printf "\033]10;rgb:$fg\007"
|
||||
|
||||
__printf_color 0 $bg
|
||||
__printf_color 7 '7c/6f/64'
|
||||
__printf_color 8 '92/83/74'
|
||||
__printf_color 9 '9d/00/06'
|
||||
__printf_color 10 '79/74/0e'
|
||||
__printf_color 11 'b5/76/14'
|
||||
__printf_color 12 '07/66/78'
|
||||
__printf_color 13 '8f/3f/71'
|
||||
__printf_color 14 '42/7b/58'
|
||||
__printf_color 15 $fg
|
||||
end
|
||||
|
||||
function __theme_gruvbox_dark
|
||||
set -l bg '28/28/28'
|
||||
switch $contrast
|
||||
case "soft"
|
||||
set bg '32/30/2f'
|
||||
case "hard"
|
||||
set bg '1d/20/21'
|
||||
end
|
||||
command printf "\033]11;rgb:$bg\007"
|
||||
|
||||
set -l fg 'eb/db/b2'
|
||||
command printf "\033]10;rgb:$fg\007"
|
||||
|
||||
__printf_color 0 $bg
|
||||
__printf_color 7 'a8/99/84'
|
||||
__printf_color 8 '92/83/74'
|
||||
__printf_color 9 'fb/59/34'
|
||||
__printf_color 10 'b8/bb/26'
|
||||
__printf_color 11 'fa/bd/2f'
|
||||
__printf_color 12 '83/a5/98'
|
||||
__printf_color 13 'd3/86/9b'
|
||||
__printf_color 14 '8e/c0/7c'
|
||||
__printf_color 15 $fg
|
||||
end
|
||||
|
||||
function __theme_gruvbox_palette
|
||||
__printf_color 236 '32/30/2f'
|
||||
__printf_color 234 '1d/20/21'
|
||||
|
||||
__printf_color 235 '28/28/28'
|
||||
__printf_color 237 '3c/38/36'
|
||||
__printf_color 239 '50/49/45'
|
||||
__printf_color 241 '66/5c/54'
|
||||
__printf_color 243 '7c/6f/64'
|
||||
|
||||
__printf_color 244 '92/83/74'
|
||||
__printf_color 245 '92/83/74'
|
||||
|
||||
__printf_color 228 'f2/e5/bc'
|
||||
__printf_color 230 'f9/f5/d7'
|
||||
|
||||
__printf_color 229 'fb/f1/c7'
|
||||
__printf_color 223 'eb/db/b2'
|
||||
__printf_color 250 'd5/c4/a1'
|
||||
__printf_color 248 'bd/ae/93'
|
||||
__printf_color 246 'a8/99/84'
|
||||
|
||||
__printf_color 167 'fb/49/34'
|
||||
__printf_color 142 'b8/bb/26'
|
||||
__printf_color 214 'fa/bd/2f'
|
||||
__printf_color 109 '83/a5/98'
|
||||
__printf_color 175 'd3/86/9b'
|
||||
__printf_color 108 '8e/c0/7c'
|
||||
__printf_color 208 'fe/80/19'
|
||||
|
||||
__printf_color 88 '9d/00/06'
|
||||
__printf_color 100 '79/74/0e'
|
||||
__printf_color 136 'b5/76/14'
|
||||
__printf_color 24 '07/66/78'
|
||||
__printf_color 96 '8f/3f/71'
|
||||
__printf_color 66 '42/7b/58'
|
||||
__printf_color 130 'af/3a/03'
|
||||
end
|
||||
|
||||
function __printf_color
|
||||
command printf "\033]4;$argv[1];rgb:$argv[2]\007"
|
||||
end
|
@ -1,11 +0,0 @@
|
||||
#!/usr/local/bin/fish
|
||||
|
||||
function tickers --description "Stock and money tickers"
|
||||
abbr -a tk 'tickrs -s'
|
||||
abbr -a vt 'tickrs -s vt'
|
||||
abbr -a vti 'tickrs -s vti'
|
||||
abbr -a vxus 'tickrs -s vxus'
|
||||
abbr -a btc 'rates btc usd'
|
||||
abbr -a ada 'rates ada usd'
|
||||
abbr -a eth 'rates eth usd'
|
||||
end
|
@ -1,11 +0,0 @@
|
||||
function today --description "Open today's journal"
|
||||
note-dates
|
||||
if [ -f $TODAY_NOTE_FILE ]
|
||||
vim $TODAY_NOTE_FILE
|
||||
else
|
||||
note-header
|
||||
printf $JOURNAL_HEADER > $TODAY_NOTE_FILE
|
||||
echo "New journal added."
|
||||
vim $TODAY_NOTE_FILE
|
||||
end
|
||||
end
|
@ -1,6 +0,0 @@
|
||||
#!/usr/bin/local/fish
|
||||
|
||||
function unsetaws --description "Clear AWS credentials environment variables"
|
||||
set -e AWS_ACCESS_KEY_ID
|
||||
set -e AWS_SECRET_ACCESS_KEY
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function worldmap --description "Terminal atlas"
|
||||
telnet mapscii.me
|
||||
end
|
581
flake.lock
generated
Normal file
581
flake.lock
generated
Normal file
@ -0,0 +1,581 @@
|
||||
{
|
||||
"nodes": {
|
||||
"Comment-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681214440,
|
||||
"narHash": "sha256-48hy+hiaDJLlgWqC7IeZI3dT+VwWkRo4atQbyPxu/ys=",
|
||||
"owner": "numToStr",
|
||||
"repo": "Comment.nvim",
|
||||
"rev": "e51f2b142d88bb666dcaa77d93a07f4b419aca70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numToStr",
|
||||
"ref": "v0.8.0",
|
||||
"repo": "Comment.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"bufferline-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1687763763,
|
||||
"narHash": "sha256-wbOeylzjjScQXkrDbBU2HtrOZrp2YUK+wQ2aOkgxmRQ=",
|
||||
"owner": "akinsho",
|
||||
"repo": "bufferline.nvim",
|
||||
"rev": "bf2f6b7edd0abf6b0732f5e5c0a8f30e51611c75",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akinsho",
|
||||
"ref": "v4.2.0",
|
||||
"repo": "bufferline.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cmp-nvim-lsp-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1687494203,
|
||||
"narHash": "sha256-mU0soCz79erJXMMqD/FyrJZ0mu2n6fE0deymPzQlxts=",
|
||||
"owner": "hrsh7th",
|
||||
"repo": "cmp-nvim-lsp",
|
||||
"rev": "44b16d11215dce86f253ce0c30949813c0a90765",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hrsh7th",
|
||||
"repo": "cmp-nvim-lsp",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687517837,
|
||||
"narHash": "sha256-Ea+JTy6NSf+wWIFrgC8gnOnyt01xwmtDEn2KecvaBkg=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "6460468e7a3e1290f132fee4170ebeaa127f6f32",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687598357,
|
||||
"narHash": "sha256-70ciIe8415oQnQypawaqocEaLJcI1XtkqRNmle8vsrg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "1e7098ee0448dc5d33df394d040f454cd42a809c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefox-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688605308,
|
||||
"narHash": "sha256-B9suu7dcdX4a18loO5ul237gqIJ5/+TRuheLj8fJjwM=",
|
||||
"owner": "bandithedoge",
|
||||
"repo": "nixpkgs-firefox-darwin",
|
||||
"rev": "78d28acf685e19d353b2ecb6c38eeb3fc624fc68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "bandithedoge",
|
||||
"repo": "nixpkgs-firefox-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1678901627,
|
||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687627695,
|
||||
"narHash": "sha256-6Pu7nWb52PRtUmihwuDNShDmsZiXgtXR0OARtH4DSik=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "172d46d4b2677b32277d903bdf4cff77c2cc6477",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nil": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680544266,
|
||||
"narHash": "sha256-d/TusDXmIo8IT5DNRA21lN+nOVSER8atIx9TJteR6LQ=",
|
||||
"owner": "oxalica",
|
||||
"repo": "nil",
|
||||
"rev": "56a1fa87b98a9508920f4b0ab8fe36d5b54b2362",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"ref": "2023-04-03",
|
||||
"repo": "nil",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix2vim": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685980282,
|
||||
"narHash": "sha256-uQyVaoqkiocA8bXKMfrgizuKmz0hUzHye5owFoUd2AQ=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "nix2vim",
|
||||
"rev": "3836a348503ae27340c7f83f0bc7bcb907f3781d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "nix2vim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1687049841,
|
||||
"narHash": "sha256-FBNZQfWtA7bb/rwk92mfiWc85x4hXta2OAouDqO5W8w=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "908af6d1fa3643c5818ea45aa92b21d6385fbbe5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-generators": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687398392,
|
||||
"narHash": "sha256-T6kc3NMTpGJk1/dve8PGupeVcxboEb78xtTKhe3LL/A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "649171f56a45af13ba693c156207eafbbbf7edfe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1687502512,
|
||||
"narHash": "sha256-dBL/01TayOSZYxtY4cMXuNCBk8UMLoqRZA+94xiFpJA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3ae20aa58a6c0d1ca95c9b11f59a2d12eebc511f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1686929285,
|
||||
"narHash": "sha256-WGtVzn+vGMPTXDO0DMNKVFtf+zUSqeW+KKk4Y/Ae99I=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "93fddcf640ceca0be331210ba3101cee9d91c13d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"null-ls-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1686871437,
|
||||
"narHash": "sha256-MxIZqyRW8jStiDNXt7Bsw8peDLKpqxKEaUuIJsXkGMI=",
|
||||
"owner": "jose-elias-alvarez",
|
||||
"repo": "null-ls.nvim",
|
||||
"rev": "bbaf5a96913aa92281f154b08732be2f57021c45",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jose-elias-alvarez",
|
||||
"repo": "null-ls.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1687625402,
|
||||
"narHash": "sha256-V+vSWypmm/tGbwNXGhqzmiV7vTjV2gNCEh9N7OhNnyA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "aeaf37c7538965e45700d39e6b5dc9c9a0e0749c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-lspconfig-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1675639052,
|
||||
"narHash": "sha256-B8IgpypxzCACZ5VcqM6KiWyClaN+KrmemtkwMznmj5Y=",
|
||||
"owner": "neovim",
|
||||
"repo": "nvim-lspconfig",
|
||||
"rev": "255e07ce2a05627d482d2de77308bba51b90470c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "neovim",
|
||||
"ref": "v0.1.6",
|
||||
"repo": "nvim-lspconfig",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-tree-lua-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1687132855,
|
||||
"narHash": "sha256-ZRUoCDBv8rO8ZUBUMLgo33EBbqD9+ZOSET9rkFsA++E=",
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "c3c6544ee00333b0f1d6a13735d0dd302dba4f70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-tree.lua",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-treesitter-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681121236,
|
||||
"narHash": "sha256-iPsPDLhVKJ14iP1/2cCgcY9SCKK/DQz9Y0mQB1DqNiM=",
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter",
|
||||
"rev": "cc360a9beb1b30d172438f640e2c3450358c4086",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-treesitter",
|
||||
"ref": "v0.9.0",
|
||||
"repo": "nvim-treesitter",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"Comment-nvim-src": "Comment-nvim-src",
|
||||
"bufferline-nvim-src": "bufferline-nvim-src",
|
||||
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
||||
"darwin": "darwin",
|
||||
"disko": "disko",
|
||||
"firefox-darwin": "firefox-darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nil": "nil",
|
||||
"nix2vim": "nix2vim",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"null-ls-nvim-src": "null-ls-nvim-src",
|
||||
"nur": "nur",
|
||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
||||
"nvim-treesitter-src": "nvim-treesitter-src",
|
||||
"telescope-nvim-src": "telescope-nvim-src",
|
||||
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
||||
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
||||
"vscode-terraform-snippets": "vscode-terraform-snippets",
|
||||
"wallpapers": "wallpapers",
|
||||
"wsl": "wsl"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nil",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nil",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680488274,
|
||||
"narHash": "sha256-0vYMrZDdokVmPQQXtFpnqA2wEgCCUXf5a3dDuDVshn0=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "7ec2ff598a172c6e8584457167575b3a1a5d80d8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"telescope-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1686302912,
|
||||
"narHash": "sha256-fV3LLRwAPykVGc4ImOnUSP+WTrPp9Ad9OTfBJ6wqTMk=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope.nvim",
|
||||
"rev": "776b509f80dd49d8205b9b0d94485568236d1192",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-telescope",
|
||||
"ref": "0.1.2",
|
||||
"repo": "telescope.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"telescope-project-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1682606566,
|
||||
"narHash": "sha256-H6lrPjpOUVleKHB0ziI+6dthg9ymitHhEWtcgYJTrKo=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope-project.nvim",
|
||||
"rev": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope-project.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"toggleterm-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1685434104,
|
||||
"narHash": "sha256-oiCnBrvft6XxiQtQH8E4F842xhh348SaTpHzaeb+iDY=",
|
||||
"owner": "akinsho",
|
||||
"repo": "toggleterm.nvim",
|
||||
"rev": "95204ece0f2a54c89c4395295432f9aeedca7b5f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akinsho",
|
||||
"ref": "v2.7.0",
|
||||
"repo": "toggleterm.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vscode-terraform-snippets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1614849738,
|
||||
"narHash": "sha256-v392tyzXV+zyBNt5OCB2NBCK7JcByrTa5Ne/nFtSCJI=",
|
||||
"owner": "run-at-scale",
|
||||
"repo": "vscode-terraform-doc-snippets",
|
||||
"rev": "6ab3e44b566e660f38922cf908e6e547eaa5d4b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "run-at-scale",
|
||||
"repo": "vscode-terraform-doc-snippets",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wallpapers": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1657544922,
|
||||
"narHash": "sha256-1c1uDz37MhksWC75myv6jao5q2mIzD8X8I+TykXXmWg=",
|
||||
"owner": "exorcist365",
|
||||
"repo": "wallpapers",
|
||||
"rev": "8d2860ac6c05cec0f78d5c9d07510f4ff5da90dc",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "exorcist365",
|
||||
"repo": "wallpapers",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687279045,
|
||||
"narHash": "sha256-LR0dsXd/A07M61jclyBUW0wRojEQteWReKM35zoJXp0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "a8486b5d191f11d571f15d80b6e265d1712d01cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
253
flake.nix
Normal file
253
flake.nix
Normal file
@ -0,0 +1,253 @@
|
||||
{
|
||||
description = "My system";
|
||||
|
||||
# Other flakes that we want to pull from
|
||||
inputs = {
|
||||
|
||||
# Used for system packages
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# Used for MacOS system config
|
||||
darwin = {
|
||||
url = "github:/lnl7/nix-darwin/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Used for Windows Subsystem for Linux compatibility
|
||||
wsl.url = "github:nix-community/NixOS-WSL";
|
||||
|
||||
# Used for user packages and dotfiles
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows =
|
||||
"nixpkgs"; # Use system packages list for their inputs
|
||||
};
|
||||
|
||||
# Community packages; used for Firefox extensions
|
||||
nur.url = "github:nix-community/nur";
|
||||
|
||||
# Use official Firefox binary for macOS
|
||||
firefox-darwin = {
|
||||
url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Manage disk format and partitioning
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Wallpapers
|
||||
wallpapers = {
|
||||
url = "gitlab:exorcist365/wallpapers";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Used to generate NixOS images for other platforms
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Convert Nix to Neovim config
|
||||
nix2vim = {
|
||||
url = "github:gytis-ivaskevicius/nix2vim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Nix language server
|
||||
nil = {
|
||||
url = "github:oxalica/nil/2023-04-03";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Neovim plugins
|
||||
nvim-lspconfig-src = {
|
||||
url = "github:neovim/nvim-lspconfig/v0.1.6";
|
||||
flake = false;
|
||||
};
|
||||
cmp-nvim-lsp-src = {
|
||||
url = "github:hrsh7th/cmp-nvim-lsp";
|
||||
flake = false;
|
||||
};
|
||||
null-ls-nvim-src = {
|
||||
url = "github:jose-elias-alvarez/null-ls.nvim";
|
||||
flake = false;
|
||||
};
|
||||
Comment-nvim-src = {
|
||||
url = "github:numToStr/Comment.nvim/v0.8.0";
|
||||
flake = false;
|
||||
};
|
||||
nvim-treesitter-src = {
|
||||
url = "github:nvim-treesitter/nvim-treesitter/v0.9.0";
|
||||
flake = false;
|
||||
};
|
||||
telescope-nvim-src = {
|
||||
url = "github:nvim-telescope/telescope.nvim/0.1.2";
|
||||
flake = false;
|
||||
};
|
||||
telescope-project-nvim-src = {
|
||||
url = "github:nvim-telescope/telescope-project.nvim";
|
||||
flake = false;
|
||||
};
|
||||
toggleterm-nvim-src = {
|
||||
url = "github:akinsho/toggleterm.nvim/v2.7.0";
|
||||
flake = false;
|
||||
};
|
||||
bufferline-nvim-src = {
|
||||
url = "github:akinsho/bufferline.nvim/v4.2.0";
|
||||
flake = false;
|
||||
};
|
||||
nvim-tree-lua-src = {
|
||||
url = "github:kyazdani42/nvim-tree.lua";
|
||||
flake = false;
|
||||
};
|
||||
vscode-terraform-snippets = {
|
||||
url = "github:run-at-scale/vscode-terraform-doc-snippets";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
|
||||
let
|
||||
|
||||
# Common overlays to always use
|
||||
overlays = [
|
||||
inputs.nur.overlay
|
||||
inputs.nix2vim.overlay
|
||||
(import ./overlays/neovim-plugins.nix inputs)
|
||||
(import ./overlays/calibre-web.nix)
|
||||
(import ./overlays/disko.nix inputs)
|
||||
(import ./overlays/tree-sitter.nix inputs)
|
||||
];
|
||||
|
||||
# Global configuration for my systems
|
||||
globals = let baseName = "masu.rs";
|
||||
in rec {
|
||||
user = "noah";
|
||||
fullName = "Noah Masur";
|
||||
gitName = fullName;
|
||||
gitEmail = "7386960+nmasur@users.noreply.github.com";
|
||||
mail.server = "noahmasur.com";
|
||||
mail.imapHost = "imap.purelymail.com";
|
||||
mail.smtpHost = "smtp.purelymail.com";
|
||||
dotfilesRepo = "git@github.com:nmasur/dotfiles";
|
||||
nixpkgs.overlays = overlays;
|
||||
hostnames = {
|
||||
git = "git.${baseName}";
|
||||
metrics = "metrics.${baseName}";
|
||||
prometheus = "prom.${baseName}";
|
||||
secrets = "vault.${baseName}";
|
||||
stream = "stream.${baseName}";
|
||||
content = "cloud.${baseName}";
|
||||
books = "books.${baseName}";
|
||||
download = "download.${baseName}";
|
||||
};
|
||||
};
|
||||
|
||||
# System types to support.
|
||||
supportedSystems =
|
||||
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||
|
||||
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
|
||||
in rec {
|
||||
|
||||
nixosModules = {
|
||||
globals = { config }: { config = globals; };
|
||||
common = import ./modules/common;
|
||||
nixos = import ./modules/nixos;
|
||||
darwin = import ./modules/darwin;
|
||||
};
|
||||
|
||||
# Contains my full system builds, including home-manager
|
||||
# nixos-rebuild switch --flake .#tempest
|
||||
nixosConfigurations = {
|
||||
tempest = import ./hosts/tempest { inherit self; };
|
||||
hydra = import ./hosts/hydra { inherit self; };
|
||||
flame = import ./hosts/flame { inherit self; };
|
||||
swan = import ./hosts/swan { inherit self; };
|
||||
};
|
||||
|
||||
# Contains my full Mac system builds, including home-manager
|
||||
# darwin-rebuild switch --flake .#lookingglass
|
||||
darwinConfigurations = {
|
||||
lookingglass = import ./hosts/lookingglass { inherit self; };
|
||||
};
|
||||
|
||||
# For quickly applying home-manager settings with:
|
||||
# home-manager switch --flake .#tempest
|
||||
homeConfigurations = {
|
||||
tempest =
|
||||
nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home;
|
||||
lookingglass =
|
||||
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
||||
};
|
||||
|
||||
# Disk formatting, only used once
|
||||
diskoConfigurations = { root = import ./disks/root.nix; };
|
||||
|
||||
packages = let
|
||||
aws = system: import ./hosts/aws { inherit self system; };
|
||||
staff = system: import ./hosts/staff { inherit self system; };
|
||||
neovim = system:
|
||||
let pkgs = import nixpkgs { inherit system overlays; };
|
||||
in import ./modules/common/neovim/package {
|
||||
inherit pkgs;
|
||||
colors = (import ./colorscheme/gruvbox-dark).dark;
|
||||
};
|
||||
in {
|
||||
x86_64-linux.aws = aws "x86_64-linux";
|
||||
x86_64-linux.staff = staff "x86_64-linux";
|
||||
|
||||
# Package Neovim config into standalone package
|
||||
x86_64-linux.neovim = neovim "x86_64-linux";
|
||||
x86_64-darwin.neovim = neovim "x86_64-darwin";
|
||||
aarch64-linux.neovim = neovim "aarch64-linux";
|
||||
aarch64-darwin.neovim = neovim "aarch64-darwin";
|
||||
};
|
||||
|
||||
# Programs that can be run by calling this flake
|
||||
apps = forAllSystems (system:
|
||||
let pkgs = import nixpkgs { inherit system overlays; };
|
||||
in import ./apps { inherit pkgs; });
|
||||
|
||||
# Development environments
|
||||
devShells = forAllSystems (system:
|
||||
let pkgs = import nixpkgs { inherit system overlays; };
|
||||
in {
|
||||
|
||||
# Used to run commands and edit files in this repo
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
# Templates for starting other projects quickly
|
||||
templates = rec {
|
||||
default = basic;
|
||||
basic = {
|
||||
path = ./templates/basic;
|
||||
description = "Basic program template";
|
||||
};
|
||||
poetry = {
|
||||
path = ./templates/poetry;
|
||||
description = "Poetry template";
|
||||
};
|
||||
python = {
|
||||
path = ./templates/python;
|
||||
description = "Legacy Python template";
|
||||
};
|
||||
haskell = {
|
||||
path = ./templates/haskell;
|
||||
description = "Haskell template";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user