update to a few things

Changed files
+523 -1088
home
hosts
darwin
modules
darwin
secrets
+424 -59
flake.lock
··· 34 34 }, 35 35 "locked": { 36 36 "lastModified": 1682226636, 37 - "narHash": "sha256-fmETHfUtQ5zOVr/4MT5wE7eNALCSQCnEUYZYmV3UEwg=", 37 + "narHash": "sha256-f/XuEoZYh+aubCfjeduvwZjd5X7IgRYnmuuhGsdfP/U=", 38 38 "ref": "main", 39 39 "rev": "095d14ff2469c8f3de7cbf45d229c0f46a733aae", 40 40 "revCount": 77, ··· 64 64 "type": "github" 65 65 } 66 66 }, 67 + "crane": { 68 + "flake": false, 69 + "locked": { 70 + "lastModified": 1686108916, 71 + "narHash": "sha256-looLH5MdY4erLiJw0XwQohGdr0fJL9y6TJY3898RA2U=", 72 + "owner": "ipetkov", 73 + "repo": "crane", 74 + "rev": "8ab1a49432695bd80ff4b7f6c6515da0e926d922", 75 + "type": "github" 76 + }, 77 + "original": { 78 + "owner": "ipetkov", 79 + "ref": "v0.12.2", 80 + "repo": "crane", 81 + "type": "github" 82 + } 83 + }, 67 84 "darwin": { 68 85 "inputs": { 69 86 "nixpkgs": [ ··· 93 110 ] 94 111 }, 95 112 "locked": { 96 - "lastModified": 1709771483, 97 - "narHash": "sha256-Hjzu9nCknHLQvhdaRFfCEprH0o15KcaNu1QDr3J88DI=", 113 + "lastModified": 1724561770, 114 + "narHash": "sha256-zv8C9RNa86CIpyHwPIVO/k+5TfM8ZbjGwOOpTe1grls=", 98 115 "owner": "LnL7", 99 116 "repo": "nix-darwin", 100 - "rev": "550340062c16d7ef8c2cc20a3d2b97bcd3c6b6f6", 117 + "rev": "ac5694a0b855a981e81b4d9f14052e3ff46ca39e", 101 118 "type": "github" 102 119 }, 103 120 "original": { ··· 181 198 "type": "github" 182 199 } 183 200 }, 184 - "eww": { 201 + "dream2nix": { 185 202 "inputs": { 186 - "flake-compat": "flake-compat_2", 203 + "devshell": [ 204 + "sg-nvim", 205 + "nci" 206 + ], 207 + "flake-compat": [ 208 + "sg-nvim", 209 + "nci" 210 + ], 211 + "flake-parts": [ 212 + "sg-nvim", 213 + "nci", 214 + "parts" 215 + ], 216 + "nix-unit": [ 217 + "sg-nvim", 218 + "nci" 219 + ], 187 220 "nixpkgs": [ 221 + "sg-nvim", 222 + "nci", 188 223 "nixpkgs" 189 224 ], 190 - "rust-overlay": [ 191 - "rust-overlay" 225 + "pre-commit-hooks": [ 226 + "sg-nvim", 227 + "nci" 192 228 ] 193 229 }, 194 230 "locked": { 195 - "lastModified": 1690660426, 196 - "narHash": "sha256-YUuH1BZ3G5dhHRZ1Z9XPXyorm8vV8G+jYbcdIGxOcOs=", 197 - "owner": "elkowar", 198 - "repo": "eww", 199 - "rev": "dc3129aee2806823bdad87785f7ef80651d5245c", 231 + "lastModified": 1696373678, 232 + "narHash": "sha256-D5yaEkxi7VnoRsBDeHYB86FikFYDL/vq77ajo3Pa3Og=", 233 + "owner": "nix-community", 234 + "repo": "dream2nix", 235 + "rev": "5e2577caaf87661e29405db7e117bda57b0e749d", 200 236 "type": "github" 201 237 }, 202 238 "original": { 203 - "owner": "elkowar", 204 - "repo": "eww", 239 + "owner": "nix-community", 240 + "repo": "dream2nix", 205 241 "type": "github" 206 242 } 207 243 }, ··· 224 260 "flake-compat_2": { 225 261 "flake": false, 226 262 "locked": { 227 - "lastModified": 1650374568, 228 - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", 263 + "lastModified": 1641205782, 264 + "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", 229 265 "owner": "edolstra", 230 266 "repo": "flake-compat", 231 - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", 267 + "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", 232 268 "type": "github" 233 269 }, 234 270 "original": { ··· 240 276 "flake-compat_3": { 241 277 "flake": false, 242 278 "locked": { 243 - "lastModified": 1641205782, 244 - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", 279 + "lastModified": 1673956053, 280 + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", 245 281 "owner": "edolstra", 246 282 "repo": "flake-compat", 247 - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", 283 + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", 248 284 "type": "github" 249 285 }, 250 286 "original": { ··· 253 289 "type": "github" 254 290 } 255 291 }, 292 + "flake-parts": { 293 + "inputs": { 294 + "nixpkgs-lib": "nixpkgs-lib" 295 + }, 296 + "locked": { 297 + "lastModified": 1696343447, 298 + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", 299 + "owner": "hercules-ci", 300 + "repo": "flake-parts", 301 + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", 302 + "type": "github" 303 + }, 304 + "original": { 305 + "owner": "hercules-ci", 306 + "repo": "flake-parts", 307 + "type": "github" 308 + } 309 + }, 256 310 "flake-utils": { 257 311 "locked": { 258 312 "lastModified": 1638122382, ··· 288 342 "systems": "systems_2" 289 343 }, 290 344 "locked": { 291 - "lastModified": 1685518550, 292 - "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", 345 + "lastModified": 1687709756, 346 + "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", 293 347 "owner": "numtide", 294 348 "repo": "flake-utils", 295 - "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", 349 + "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", 296 350 "type": "github" 297 351 }, 298 352 "original": { ··· 306 360 "systems": "systems_3" 307 361 }, 308 362 "locked": { 309 - "lastModified": 1687709756, 310 - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", 363 + "lastModified": 1681202837, 364 + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", 311 365 "owner": "numtide", 312 366 "repo": "flake-utils", 313 - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", 367 + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", 314 368 "type": "github" 315 369 }, 316 370 "original": { ··· 324 378 "systems": "systems_4" 325 379 }, 326 380 "locked": { 381 + "lastModified": 1685518550, 382 + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", 383 + "owner": "numtide", 384 + "repo": "flake-utils", 385 + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", 386 + "type": "github" 387 + }, 388 + "original": { 389 + "owner": "numtide", 390 + "repo": "flake-utils", 391 + "type": "github" 392 + } 393 + }, 394 + "flake-utils_6": { 395 + "inputs": { 396 + "systems": "systems_5" 397 + }, 398 + "locked": { 327 399 "lastModified": 1681202837, 328 400 "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", 329 401 "owner": "numtide", ··· 334 406 "original": { 335 407 "owner": "numtide", 336 408 "repo": "flake-utils", 409 + "type": "github" 410 + } 411 + }, 412 + "gitignore": { 413 + "inputs": { 414 + "nixpkgs": [ 415 + "sg-nvim", 416 + "pre-commit-nix", 417 + "nixpkgs" 418 + ] 419 + }, 420 + "locked": { 421 + "lastModified": 1660459072, 422 + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", 423 + "owner": "hercules-ci", 424 + "repo": "gitignore.nix", 425 + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", 426 + "type": "github" 427 + }, 428 + "original": { 429 + "owner": "hercules-ci", 430 + "repo": "gitignore.nix", 337 431 "type": "github" 338 432 } 339 433 }, ··· 402 496 ] 403 497 }, 404 498 "locked": { 405 - "lastModified": 1704099619, 406 - "narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=", 499 + "lastModified": 1720042825, 500 + "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=", 407 501 "owner": "nix-community", 408 502 "repo": "home-manager", 409 - "rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851", 503 + "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073", 410 504 "type": "github" 411 505 }, 412 506 "original": { 413 507 "owner": "nix-community", 414 - "ref": "release-23.11", 508 + "ref": "release-24.05", 415 509 "repo": "home-manager", 416 510 "type": "github" 417 511 } ··· 464 558 "type": "github" 465 559 } 466 560 }, 467 - "llamacpp": { 561 + "mk-naked-shell": { 562 + "flake": false, 563 + "locked": { 564 + "lastModified": 1681286841, 565 + "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=", 566 + "owner": "yusdacra", 567 + "repo": "mk-naked-shell", 568 + "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd", 569 + "type": "github" 570 + }, 571 + "original": { 572 + "owner": "yusdacra", 573 + "repo": "mk-naked-shell", 574 + "type": "github" 575 + } 576 + }, 577 + "nci": { 468 578 "inputs": { 469 - "flake-utils": "flake-utils_3", 470 - "nixpkgs": [ 471 - "unstable" 472 - ] 579 + "crane": "crane", 580 + "dream2nix": "dream2nix", 581 + "mk-naked-shell": "mk-naked-shell", 582 + "nixpkgs": "nixpkgs_5", 583 + "parts": "parts", 584 + "rust-overlay": "rust-overlay_2", 585 + "treefmt": "treefmt" 473 586 }, 474 587 "locked": { 475 - "lastModified": 1691180171, 476 - "narHash": "sha256-ZmSRPACkLlPWtKfux9o+FB0mXZbINowyb0057ouAL/0=", 477 - "owner": "ggerganov", 478 - "repo": "llama.cpp", 479 - "rev": "332311234a0aa2974b2450710e22e09d90dd6b0b", 588 + "lastModified": 1696572678, 589 + "narHash": "sha256-rcznf00l41VtjzvEGMWOxaj5J/5twES6n30VwbJMgl0=", 590 + "owner": "yusdacra", 591 + "repo": "nix-cargo-integration", 592 + "rev": "cacb6c94004a35676c193f04afa8821758986bf0", 480 593 "type": "github" 481 594 }, 482 595 "original": { 483 - "owner": "ggerganov", 484 - "repo": "llama.cpp", 596 + "owner": "yusdacra", 597 + "repo": "nix-cargo-integration", 485 598 "type": "github" 486 599 } 487 600 }, ··· 506 619 "nix-homebrew": { 507 620 "inputs": { 508 621 "brew-src": "brew-src", 509 - "flake-utils": "flake-utils_4", 622 + "flake-utils": "flake-utils_3", 510 623 "nix-darwin": "nix-darwin", 511 624 "nixpkgs": "nixpkgs_2" 512 625 }, ··· 527 640 "nix-matrix-appservices": { 528 641 "inputs": { 529 642 "devshell": "devshell", 530 - "flake-compat": "flake-compat_3", 643 + "flake-compat": "flake-compat_2", 531 644 "nixlib": "nixlib", 532 645 "nixpkgs": "nixpkgs_3" 533 646 }, ··· 589 702 "type": "indirect" 590 703 } 591 704 }, 705 + "nixpkgs-lib": { 706 + "locked": { 707 + "dir": "lib", 708 + "lastModified": 1696019113, 709 + "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", 710 + "owner": "NixOS", 711 + "repo": "nixpkgs", 712 + "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", 713 + "type": "github" 714 + }, 715 + "original": { 716 + "dir": "lib", 717 + "owner": "NixOS", 718 + "ref": "nixos-unstable", 719 + "repo": "nixpkgs", 720 + "type": "github" 721 + } 722 + }, 723 + "nixpkgs-stable": { 724 + "locked": { 725 + "lastModified": 1685801374, 726 + "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", 727 + "owner": "NixOS", 728 + "repo": "nixpkgs", 729 + "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", 730 + "type": "github" 731 + }, 732 + "original": { 733 + "owner": "NixOS", 734 + "ref": "nixos-23.05", 735 + "repo": "nixpkgs", 736 + "type": "github" 737 + } 738 + }, 592 739 "nixpkgs_2": { 593 740 "locked": { 594 741 "lastModified": 1688049487, ··· 623 770 }, 624 771 "nixpkgs_4": { 625 772 "locked": { 626 - "lastModified": 1704874635, 627 - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", 773 + "lastModified": 1724531977, 774 + "narHash": "sha256-XROVLf9ti4rrNCFLr+DmXRZtPjCQTW4cYy59owTEmxk=", 775 + "owner": "nixos", 776 + "repo": "nixpkgs", 777 + "rev": "2527da1ef492c495d5391f3bcf9c1dd9f4514e32", 778 + "type": "github" 779 + }, 780 + "original": { 781 + "owner": "nixos", 782 + "ref": "nixos-24.05", 783 + "repo": "nixpkgs", 784 + "type": "github" 785 + } 786 + }, 787 + "nixpkgs_5": { 788 + "locked": { 789 + "lastModified": 1696193975, 790 + "narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=", 791 + "owner": "NixOS", 792 + "repo": "nixpkgs", 793 + "rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242", 794 + "type": "github" 795 + }, 796 + "original": { 797 + "owner": "NixOS", 798 + "ref": "nixos-unstable", 799 + "repo": "nixpkgs", 800 + "type": "github" 801 + } 802 + }, 803 + "nixpkgs_6": { 804 + "locked": { 805 + "lastModified": 1696419054, 806 + "narHash": "sha256-EdR+dIKCfqL3voZUDYwcvgRDOektQB9KbhBVcE0/3Mo=", 628 807 "owner": "nixos", 629 808 "repo": "nixpkgs", 630 - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", 809 + "rev": "7131f3c223a2d799568e4b278380cd9dac2b8579", 631 810 "type": "github" 632 811 }, 633 812 "original": { 634 813 "owner": "nixos", 635 - "ref": "nixos-23.11", 814 + "ref": "nixpkgs-unstable", 815 + "repo": "nixpkgs", 816 + "type": "github" 817 + } 818 + }, 819 + "nixpkgs_7": { 820 + "locked": { 821 + "lastModified": 1689261696, 822 + "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", 823 + "owner": "NixOS", 824 + "repo": "nixpkgs", 825 + "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", 826 + "type": "github" 827 + }, 828 + "original": { 829 + "owner": "NixOS", 830 + "ref": "nixpkgs-unstable", 831 + "repo": "nixpkgs", 832 + "type": "github" 833 + } 834 + }, 835 + "nixpkgs_8": { 836 + "locked": { 837 + "lastModified": 1681358109, 838 + "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", 839 + "owner": "NixOS", 840 + "repo": "nixpkgs", 841 + "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", 842 + "type": "github" 843 + }, 844 + "original": { 845 + "owner": "NixOS", 846 + "ref": "nixpkgs-unstable", 636 847 "repo": "nixpkgs", 637 848 "type": "github" 638 849 } ··· 652 863 "type": "github" 653 864 } 654 865 }, 866 + "parts": { 867 + "inputs": { 868 + "nixpkgs-lib": [ 869 + "sg-nvim", 870 + "nci", 871 + "nixpkgs" 872 + ] 873 + }, 874 + "locked": { 875 + "lastModified": 1696343447, 876 + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", 877 + "owner": "hercules-ci", 878 + "repo": "flake-parts", 879 + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", 880 + "type": "github" 881 + }, 882 + "original": { 883 + "owner": "hercules-ci", 884 + "repo": "flake-parts", 885 + "type": "github" 886 + } 887 + }, 655 888 "poonam": { 656 889 "inputs": { 657 890 "nixpkgs": [ ··· 659 892 ] 660 893 }, 661 894 "locked": { 662 - "lastModified": 1709870438, 663 - "narHash": "sha256-vhkb5g7bM/y1j3mb42lV5KIGNGTy1xMm5h6UkQvJReY=", 895 + "lastModified": 1724637654, 896 + "narHash": "sha256-YXmWxUEG3NDsLn46Ctrgn7YcT/h0fsCAxKcSgIhCSLo=", 664 897 "ref": "main", 665 - "rev": "4384fc4dc19822cbfd5ead1fcdb77cac8d238cff", 666 - "revCount": 1376, 898 + "rev": "521e360df123a530fc4c99187e3580bd5d086a9d", 899 + "revCount": 1467, 667 900 "type": "git", 668 901 "url": "ssh://gitea@git.sealight.xyz/aynish/kitaab" 669 902 }, ··· 673 906 "url": "ssh://gitea@git.sealight.xyz/aynish/kitaab" 674 907 } 675 908 }, 909 + "pre-commit-nix": { 910 + "inputs": { 911 + "flake-compat": "flake-compat_3", 912 + "flake-utils": "flake-utils_5", 913 + "gitignore": "gitignore", 914 + "nixpkgs": "nixpkgs_7", 915 + "nixpkgs-stable": "nixpkgs-stable" 916 + }, 917 + "locked": { 918 + "lastModified": 1696516544, 919 + "narHash": "sha256-8rKE8Je6twTNFRTGF63P9mE3lZIq917RAicdc4XJO80=", 920 + "owner": "cachix", 921 + "repo": "pre-commit-hooks.nix", 922 + "rev": "66c352d33e0907239e4a69416334f64af2c685cc", 923 + "type": "github" 924 + }, 925 + "original": { 926 + "owner": "cachix", 927 + "repo": "pre-commit-hooks.nix", 928 + "type": "github" 929 + } 930 + }, 676 931 "root": { 677 932 "inputs": { 678 933 "agenix": "agenix", ··· 680 935 "darwin": "darwin_2", 681 936 "deploy-rs": "deploy-rs", 682 937 "disko": "disko", 683 - "eww": "eww", 684 938 "grasp": "grasp", 685 939 "hardware": "hardware", 686 940 "home-manager": "home-manager_2", 687 941 "homebrew-bundle": "homebrew-bundle", 688 942 "homebrew-cask": "homebrew-cask", 689 943 "homebrew-core": "homebrew-core", 690 - "llamacpp": "llamacpp", 691 944 "nix-homebrew": "nix-homebrew", 692 945 "nix-matrix-appservices": "nix-matrix-appservices", 693 946 "nixos-hardware": "nixos-hardware", ··· 695 948 "nur": "nur", 696 949 "poonam": "poonam", 697 950 "rust-overlay": "rust-overlay", 951 + "sg-nvim": "sg-nvim", 952 + "sourcegraph-src-cli-cask": "sourcegraph-src-cli-cask", 698 953 "tidalcycles": "tidalcycles", 699 954 "unstable": "unstable", 700 955 "vimwikicli": "vimwikicli" ··· 702 957 }, 703 958 "rust-overlay": { 704 959 "inputs": { 705 - "flake-utils": "flake-utils_5", 960 + "flake-utils": "flake-utils_4", 706 961 "nixpkgs": [ 707 962 "nixpkgs" 708 963 ] ··· 721 976 "type": "github" 722 977 } 723 978 }, 979 + "rust-overlay_2": { 980 + "flake": false, 981 + "locked": { 982 + "lastModified": 1696558324, 983 + "narHash": "sha256-TnnP4LGwDB8ZGE7h2n4nA9Faee8xPkMdNcyrzJ57cbw=", 984 + "owner": "oxalica", 985 + "repo": "rust-overlay", 986 + "rev": "fdb37574a04df04aaa8cf7708f94a9309caebe2b", 987 + "type": "github" 988 + }, 989 + "original": { 990 + "owner": "oxalica", 991 + "repo": "rust-overlay", 992 + "type": "github" 993 + } 994 + }, 995 + "rust-overlay_3": { 996 + "inputs": { 997 + "flake-utils": "flake-utils_6", 998 + "nixpkgs": "nixpkgs_8" 999 + }, 1000 + "locked": { 1001 + "lastModified": 1696558324, 1002 + "narHash": "sha256-TnnP4LGwDB8ZGE7h2n4nA9Faee8xPkMdNcyrzJ57cbw=", 1003 + "owner": "oxalica", 1004 + "repo": "rust-overlay", 1005 + "rev": "fdb37574a04df04aaa8cf7708f94a9309caebe2b", 1006 + "type": "github" 1007 + }, 1008 + "original": { 1009 + "owner": "oxalica", 1010 + "repo": "rust-overlay", 1011 + "type": "github" 1012 + } 1013 + }, 1014 + "sg-nvim": { 1015 + "inputs": { 1016 + "flake-parts": "flake-parts", 1017 + "nci": "nci", 1018 + "nixpkgs": "nixpkgs_6", 1019 + "pre-commit-nix": "pre-commit-nix", 1020 + "rust-overlay": "rust-overlay_3" 1021 + }, 1022 + "locked": { 1023 + "lastModified": 1716664639, 1024 + "narHash": "sha256-5wzTW9kJGYq41kXG9JoVAaA5601K26cDrweT2PtpEw8=", 1025 + "owner": "sourcegraph", 1026 + "repo": "sg.nvim", 1027 + "rev": "8bdd4d19da2268072708d5fe18fda9c23e16509d", 1028 + "type": "github" 1029 + }, 1030 + "original": { 1031 + "owner": "sourcegraph", 1032 + "repo": "sg.nvim", 1033 + "type": "github" 1034 + } 1035 + }, 1036 + "sourcegraph-src-cli-cask": { 1037 + "flake": false, 1038 + "locked": { 1039 + "lastModified": 1722629753, 1040 + "narHash": "sha256-3OwvDSoVzklr3ca1qCXR27Kc8hGjshRRdtVQ8OUXQCc=", 1041 + "owner": "sourcegraph", 1042 + "repo": "homebrew-src-cli", 1043 + "rev": "130bd8ab70961e5c1f890811bfb1f7552a2ee5a9", 1044 + "type": "github" 1045 + }, 1046 + "original": { 1047 + "owner": "sourcegraph", 1048 + "repo": "homebrew-src-cli", 1049 + "type": "github" 1050 + } 1051 + }, 724 1052 "superdirt-src": { 725 1053 "flake": false, 726 1054 "locked": { ··· 798 1126 "type": "github" 799 1127 } 800 1128 }, 1129 + "systems_5": { 1130 + "locked": { 1131 + "lastModified": 1681028828, 1132 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 1133 + "owner": "nix-systems", 1134 + "repo": "default", 1135 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 1136 + "type": "github" 1137 + }, 1138 + "original": { 1139 + "owner": "nix-systems", 1140 + "repo": "default", 1141 + "type": "github" 1142 + } 1143 + }, 801 1144 "tidal-src": { 802 1145 "flake": false, 803 1146 "locked": { ··· 841 1184 "type": "github" 842 1185 } 843 1186 }, 1187 + "treefmt": { 1188 + "inputs": { 1189 + "nixpkgs": [ 1190 + "sg-nvim", 1191 + "nci", 1192 + "nixpkgs" 1193 + ] 1194 + }, 1195 + "locked": { 1196 + "lastModified": 1695822946, 1197 + "narHash": "sha256-IQU3fYo0H+oGlqX5YrgZU3VRhbt2Oqe6KmslQKUO4II=", 1198 + "owner": "numtide", 1199 + "repo": "treefmt-nix", 1200 + "rev": "720bd006d855b08e60664e4683ccddb7a9ff614a", 1201 + "type": "github" 1202 + }, 1203 + "original": { 1204 + "owner": "numtide", 1205 + "repo": "treefmt-nix", 1206 + "type": "github" 1207 + } 1208 + }, 844 1209 "unstable": { 845 1210 "locked": { 846 - "lastModified": 1704194953, 847 - "narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", 1211 + "lastModified": 1724819573, 1212 + "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", 848 1213 "owner": "nixos", 849 1214 "repo": "nixpkgs", 850 - "rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6", 1215 + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", 851 1216 "type": "github" 852 1217 }, 853 1218 "original": {
+27 -28
flake.nix
··· 3 3 4 4 inputs = { 5 5 # Nixpkgs 6 - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; 6 + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; 7 7 unstable.url = "github:nixos/nixpkgs/nixos-unstable"; 8 8 nixos-hardware.url = "github:NixOS/nixos-hardware/master"; 9 9 10 10 # Home manager 11 - home-manager.url = "github:nix-community/home-manager/release-23.11"; 11 + home-manager.url = "github:nix-community/home-manager/release-24.05"; 12 12 home-manager.inputs.nixpkgs.follows = "nixpkgs"; 13 13 hardware.url = "github:nixos/nixos-hardware"; 14 14 ··· 55 55 flake = false; 56 56 }; 57 57 58 + # Sourcegraph 59 + sourcegraph-src-cli-cask = { 60 + url = "github:sourcegraph/homebrew-src-cli"; 61 + flake = false; 62 + }; 63 + sg-nvim.url = "github:sourcegraph/sg.nvim"; 64 + 58 65 # Others 59 66 nur.url = "github:nix-community/NUR"; 60 67 rust-overlay = { 61 68 url = "github:oxalica/rust-overlay"; 62 69 inputs.nixpkgs.follows = "nixpkgs"; 63 70 }; 64 - eww = { 65 - url = "github:elkowar/eww"; 66 - inputs.nixpkgs.follows = "nixpkgs"; 67 - inputs.rust-overlay.follows = "rust-overlay"; 68 - }; 69 71 tidalcycles.url = "github:mitchmindtree/tidalcycles.nix"; 70 72 tidalcycles.inputs.nixpkgs.follows = "unstable"; 71 - llamacpp.url = "github:ggerganov/llama.cpp"; 72 - llamacpp.inputs.nixpkgs.follows = "unstable"; 73 73 # TODO hundred rabbits software 74 74 # TODO needs secrets 75 75 # dhyan.url = "git+ssh://gitea@git.sealight.xyz/aynish/dhyan?ref=main"; ··· 94 94 , nur 95 95 , tidalcycles 96 96 , rust-overlay 97 - , eww 98 - , llamacpp 99 97 , vimwikicli 100 98 , darwin 101 99 , nix-homebrew 102 100 , homebrew-bundle 103 101 , homebrew-core 104 102 , homebrew-cask 103 + , sourcegraph-src-cli-cask 104 + , sg-nvim 105 105 , ... 106 106 }@inputs: 107 107 let ··· 116 116 # We already have these in scope 117 117 unstable = unstable.legacyPackages.${prev.system}; 118 118 deploy = deploy-rs.packages.${prev.system}.deploy-rs; 119 - }; 120 - llamaOverlay = final: prev: { 121 - llama = llamacpp.packages.${prev.system}.default; 119 + sg-nvim = sg-nvim.packages.${prev.system}.default; 122 120 }; 123 121 vimwikiOverlay = final: prev: { 124 122 vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli; ··· 131 129 "VCV-Rack" 132 130 "SunVox" 133 131 "renoise" 132 + "graphite-cli" 134 133 ]; 135 134 # config.permittedInsecurePackages = [ 136 135 # "python3.10-django-3.1.14" # Needed for archivebox deployments on curve ··· 143 142 nur.overlay 144 143 nix-matrix-appservices.overlay 145 144 unstableOverlay 146 - llamaOverlay 147 145 # TODO Not available publically 148 146 # vimwikiOverlay 149 147 self.overlays.additions ··· 195 193 specialArgs = { inherit inputs self; }; 196 194 modules = [ 197 195 ./hosts/darwin 198 - # agenix.darwinModule.age 199 196 home-manager.darwinModules.home-manager 200 - nix-homebrew.darwinModules.nix-homebrew 197 + agenix.darwinModules.default 198 + # nix-homebrew.darwinModules.nix-homebrew 201 199 { 202 200 users.users.anishlakhwara.home = "/Users/anishlakhwara"; 203 201 home-manager = { ··· 205 203 useGlobalPkgs = true; 206 204 useUserPackages = true; 207 205 }; 208 - nix-homebrew = { 209 - user = "anishlakhwara"; 210 - enable = true; 211 - taps = { 212 - "homebrew/homebrew-core" = homebrew-core; 213 - "homebrew/homebrew-cask" = homebrew-cask; 214 - "homebrew/homebrew-bundle" = homebrew-bundle; 215 - }; 216 - mutableTaps = false; 217 - autoMigrate = true; 218 - }; 206 + # nix-homebrew = { 207 + # user = "anishlakhwara"; 208 + # enable = true; 209 + # # taps = { 210 + # # "homebrew/homebrew-core" = homebrew-core; 211 + # # "homebrew/homebrew-cask" = homebrew-cask; 212 + # # "homebrew/homebrew-bundle" = homebrew-bundle; 213 + # # "sourcegraph/homebrew-src-cli" = sourcegraph-src-cli-cask; 214 + # # }; 215 + # mutableTaps = true; 216 + # autoMigrate = true; 217 + # }; 219 218 } 220 219 ]; 221 220 };
+1 -1
home/core/default.nix
··· 1 1 { self, pkgs, ... }: 2 2 { 3 3 imports = [ 4 - ../profiles/nvim 4 + # ../profiles/nvim 5 5 ../profiles/cli 6 6 ../profiles/direnv 7 7 ../profiles/git
+21 -1
home/darwin/default.nix
··· 14 14 home.homeDirectory = "/Users/anishlakhwara"; 15 15 home.stateVersion = "22.05"; 16 16 17 - programs.zsh.initExtra = "PATH=/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH"; 17 + # networking.wg-quick.interfaces = { 18 + # wg0 = { 19 + # address = [ "10.0.69.7/24" ]; 20 + # listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers) 21 + # privateKeyFile = "/run/agenix/work-wg"; 22 + # peers = [ 23 + # # For a client configuration, one peer entry for the server will suffice. 24 + # { 25 + # publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI="; 26 + # allowedIPs = [ "10.0.69.0/24" ]; 27 + # # Set this to the server IP and port. 28 + # endpoint = "sealight.xyz:60990"; # TODO: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577 29 + # persistentKeepalive = 25; 30 + # } 31 + # ]; 32 + # }; 33 + # }; 34 + 35 + programs.zsh.initExtra = '' 36 + PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH 37 + ''; 18 38 19 39 # Managing sketchybar plugins from home-manager 20 40 home.file = {
+4 -1
home/profiles/cli/default.nix
··· 7 7 dasht 8 8 dosfstools 9 9 # git 10 + git-machete 11 + asciinema 10 12 bottom 11 13 gptfdisk 12 14 starship ··· 35 37 eza 36 38 bat 37 39 fd 38 - ncdu 40 + # ncdu 39 41 duf 40 42 trash-cli 41 43 nix-index ··· 255 257 256 258 # git 257 259 g = "git"; 260 + gl = "git log --pretty=oneline --abbrev-commit"; 258 261 259 262 # grep 260 263 grep = "rg";
+3
home/profiles/git/config
··· 15 15 default = current 16 16 [pull] 17 17 rebase = true 18 + [merge] 19 + mergetool = nvim -d 20 + conflictstyle = diff3 18 21 [alias] 19 22 unadd = reset HEAD 20 23 # data analysis
+3 -957
home/profiles/nvim/default.nix
··· 1 1 { pkgs, ... }: 2 - let 3 - customPlugins = { 4 - vim-zettel = pkgs.vimUtils.buildVimPlugin { 5 - name = "vim-zettel"; 6 - src = pkgs.fetchFromGitHub { 7 - owner = "michal-h21"; 8 - repo = "vim-zettel"; 9 - rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d"; 10 - sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4="; 11 - }; 12 - }; 13 - lsp-format = pkgs.vimUtils.buildVimPlugin { 14 - name = "lsp-format"; 15 - src = pkgs.fetchFromGitHub { 16 - owner = "lukas-reineke"; 17 - repo = "lsp-format.nvim"; 18 - rev = "84e117b99bb2bc0d0c8122e2b256046f046f8aff"; 19 - sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4="; 20 - }; 21 - }; 22 - my-lspsaga = pkgs.vimUtils.buildVimPlugin { 23 - name = "lspsaga.nvim"; 24 - src = pkgs.fetchFromGitHub { 25 - owner = "glepnir"; 26 - repo = "lspsaga.nvim"; 27 - rev = "b7b4777369b441341b2dcd45c738ea4167c11c9e"; 28 - sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk="; 29 - }; 30 - }; 31 - nvim-luapad = pkgs.vimUtils.buildVimPlugin { 32 - name = "nvim-luapad"; 33 - src = pkgs.fetchFromGitHub { 34 - owner = "rafcamlet"; 35 - repo = "nvim-luapad"; 36 - rev = "9815e2659ce8e2ef4b55e401531cf09b6423e0ea"; 37 - sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo="; 38 - }; 39 - }; 40 - leap = pkgs.vimUtils.buildVimPlugin { 41 - name = "leap"; 42 - src = pkgs.fetchFromGitHub { 43 - owner = "ggandor"; 44 - repo = "leap.nvim"; 45 - rev = "1bb1fec369b1e9ae96e6ff1b829ea9272c51f844"; 46 - sha256 = "dH0v1D5q5OlMLA/omTDMb/taKyIgQ5VfVMYXJ609k/k="; 47 - }; 48 - }; 49 - nvim-navic = pkgs.vimUtils.buildVimPlugin { 50 - name = "nvim-navic"; 51 - src = pkgs.fetchFromGitHub { 52 - owner = "SmiteshP"; 53 - repo = "nvim-navic"; 54 - rev = "096b23e73c84a653fd317c0c10261875fa573a6d"; 55 - sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc="; 56 - }; 57 - }; 58 - my-which-key-nvim = pkgs.vimUtils.buildVimPlugin { 59 - pname = "which-key.nvim"; 60 - version = "2022-05-04"; 61 - src = pkgs.fetchFromGitHub { 62 - owner = "folke"; 63 - repo = "which-key.nvim"; 64 - rev = "bd4411a2ed4dd8bb69c125e339d837028a6eea71"; 65 - sha256 = "0vf685xgdb967wmvffk1pfrvbhg1jkvzp1kb7r0vs90mg8gpv1aj"; 66 - }; 67 - meta.homepage = "https://github.com/folke/which-key.nvim/"; 68 - }; 69 - scnvim = pkgs.vimUtils.buildVimPlugin { 70 - pname = "scnvim"; 71 - version = "2022-06-04"; 72 - src = pkgs.fetchFromGitHub { 73 - owner = "davidgranstrom"; 74 - repo = "scnvim"; 75 - rev = "746cc0db820d02a9c36b8f9ba2eac9725fa73107"; 76 - sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc="; 77 - }; 78 - }; 79 - yuck-vim = pkgs.vimUtils.buildVimPlugin { 80 - pname = "yuck.vim"; 81 - version = "2021-08-09"; 82 - src = pkgs.fetchFromGitHub { 83 - owner = "elkowar"; 84 - repo = "yuck.vim"; 85 - rev = "6dc3da77c53820c32648cf67cbdbdfb6994f4e08"; 86 - sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE="; 87 - }; 88 - }; 89 - nvim-parinfer = pkgs.vimUtils.buildVimPlugin { 90 - pname = "nvim-parinfer"; 91 - version = "v1.2.0"; 92 - src = pkgs.fetchFromGitHub { 93 - owner = "gpanders"; 94 - repo = "nvim-parinfer"; 95 - rev = "82bce5798993f4fe5ced20e74003b492490b4fe8"; 96 - sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc="; 97 - }; 98 - }; 99 - my-marks = pkgs.vimUtils.buildVimPlugin { 100 - pname = "marks"; 101 - version = "2022-08-31"; 102 - src = pkgs.fetchFromGitHub { 103 - owner = "chentoast"; 104 - repo = "marks.nvim"; 105 - rev = "b27cbb78e9082229590b396d3ae4fe07f1aeafe0"; 106 - sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk="; 107 - }; 108 - }; 109 - my-fterm = pkgs.vimUtils.buildVimPlugin { 110 - pname = "fterm"; 111 - version = "2022-07-22"; 112 - src = pkgs.fetchFromGitHub { 113 - owner = "numToStr"; 114 - repo = "FTerm.nvim"; 115 - rev = "efd10656724a269e21ba68d65e2b058a4e606424"; 116 - sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE="; 117 - }; 118 - }; 119 - my-nvim-peekup = pkgs.vimUtils.buildVimPlugin { 120 - pname = "nvim-peekup"; 121 - version = "0.1.0"; 122 - src = pkgs.fetchFromGitHub { 123 - owner = "gennaro-tedesco"; 124 - repo = "nvim-peekup"; 125 - rev = "73a67c1ee3b5a7ea7b42d85399bf093f428c8ee3"; 126 - sha256 = "czKjJgCpvRSdtR7rNGlJrluDgPIdx94KUyx33op5gdY="; 127 - }; 128 - }; 129 - }; 130 - 131 - my-python-packages = python-packages: with python-packages; [ 132 - tasklib 133 - pynvim 134 - six 135 - pylsp-mypy 136 - #pyls-isort 137 - #pyls-black 138 - black 139 - isort 140 - # other python packages you want 141 - ]; 142 - python-with-my-packages = pkgs.python3.withPackages my-python-packages; 143 - in 144 2 { 145 3 home.sessionVariables.EDITOR = "nvim"; 146 4 home.shellAliases = { 147 5 k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD"; 148 - # kitaab zettel 149 - kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD"; 150 - # kitaab recents 151 - kr = "cd /home/anish/kitaab/vimwiki; exa --sort=modified --reverse | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD"; 152 - # kitaab get by tagged 153 - kt = "cd /home/anish/kitaab/vimwiki; exa *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD"; 154 - # List files that have no links in them 155 - ku = "cd /home/anish/kitaab/;vim ./vimwiki/$(python3 poonam/main.py report --titles=false | tail -n +4 | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./vimwiki/{}');cd $OLDPWD"; 156 6 }; 157 - # Add %update to the highlight clause for vimwiki files 158 - home.file.".config/nvim/after/syntax/vimwiki.vim".text = '' 159 - " match with %update 160 - syntax match VimwikiPlaceholder /^\s*%update\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite 161 - " match with %link 162 - syntax match VimwikiPlaceholder /^\s*%link\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite 163 - ''; 164 7 165 - #environment.systemPackages = with customPlugins; [ tidal ]; 166 8 programs.neovim = { 167 9 enable = true; 168 - 169 - extraConfig = '' 170 - " so our custom files still get included 171 - set runtimepath+=/home/anish/.config/nvim/ 172 - set tabstop=2 173 - set showmatch 174 - set shiftwidth=2 175 - set noexpandtab 176 - set autoindent 177 - set undofile 178 - set signcolumn=auto:4 179 - set title 180 - 181 - " set foldmethod=indent " fold based on indent 182 - set number 183 - set nocompatible 184 - set relativenumber 185 - set showtabline=2 186 - set noexpandtab 187 - set autowriteall 188 - set list lcs=tab:\|\ 189 - filetype plugin on 190 - 191 - " include - in word to move across easier in lisp / clojure 192 - set iskeyword+=- 193 - 194 - set termguicolors 195 - colorscheme ayu-mirage 196 - 197 - " set spell 198 - set spelllang=en_gb 199 - set ignorecase 200 - set smartcase 201 - set incsearch 202 - " if hidden is not set, TextEdit might fail. 203 - set hidden 204 - " Some servers have issues with backup files, see #649 205 - set nobackup 206 - set nowritebackup 207 - " Better display for messages 208 - set cmdheight=2 209 - " You will have bad experience for diagnostic messages when it's default 4000. 210 - set updatetime=300 211 - " don't give |ins-completion-menu| messages. 212 - set shortmess+=c 213 - " always show signcolumns 214 - set signcolumn=yes 215 - " highlight row 216 - set cursorline 217 - 218 - let mapleader = "\<Space>" 219 - let maplocalleader = "," 220 - 221 - " window 222 - nmap <leader>wh :topleft vnew<CR> 223 - nmap <leader>wl :botright vnew<CR> 224 - nmap <leader>wk :topleft new<CR> 225 - nmap <leader>wj :botright new<CR> 226 - 227 - " tabs 228 - nmap <leader>rt :retab!<CR> 229 - vmap <leader>rt :retab!<CR> 230 - 231 - " moving splits with vim movements. 232 - :tnoremap <A-h> <C-\><C-N><C-w>h 233 - :tnoremap <A-j> <C-\><C-N><C-w>j 234 - :tnoremap <A-k> <C-\><C-N><C-w>k 235 - :tnoremap <A-l> <C-\><C-N><C-w>l 236 - :inoremap <A-h> <C-\><C-N><C-w>h 237 - :inoremap <A-j> <C-\><C-N><C-w>j 238 - :inoremap <A-k> <C-\><C-N><C-w>k 239 - :inoremap <A-l> <C-\><C-N><C-w>l 240 - :nnoremap <A-h> <leader>h 241 - :nnoremap <A-j> <leader>j 242 - :nnoremap <A-k> <leader>k 243 - :nnoremap <A-l> <leader>l 244 - :nnoremap <F5> "=strftime("%Y-%m-%d %H:%M")<CR> 245 - :inoremap <F5> <C-R>=strftime("%Y-%m-%d %H:%M")<CR> 246 - :inoremap <F4> <C-R>=strftime("%H:%M")<CR> 247 - 248 - " tidal nvim terminal 249 - let g:tidal_target = "terminal" 250 - 251 - " latex 252 - " let g:tex_flavor='latex' 253 - " let g:vimtex_view_method='zathura' 254 - " let g:vimtex_quickfix_mode=0 255 - " set conceallevel=1 256 - " let g:tex_conceal='abdmg' 257 - 258 - " telescope 259 - " Find files using Telescope command-line sugar. 260 - nnoremap <leader>ff <cmd>Telescope find_files<cr> 261 - nnoremap <leader>fg <cmd>Telescope live_grep<cr> 262 - nnoremap <leader>fb <cmd>Telescope buffers<cr> 263 - nnoremap <leader>fh <cmd>Telescope help_tags<cr> 264 - nnoremap <leader>ft <cmd>Telescope tags<cr> 265 - 266 - " exit normal mode in terminal 267 - :tnoremap <C-n> <C-\><C-n> 268 - 269 - " Sexp in Conjure (since it's fennel) 270 - let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck" 271 - let g:conjure#filetype#fennel = "conjure.client.fennel.stdio" 272 - " we only use fennel with love; no we don't... 273 - let g:conjure#client#fennel#stdio#command = "fennel" 274 - " let g:conjure#extract#tree_sitter#enabled = true 275 - map <localleader>lt :ConjureLogToggle<CR> 276 - 277 - let g:rainbow_active = 0 278 - autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll 279 - 280 - " general commands 281 - map <leader>t :NERDTreeToggle<CR> 282 - map <leader>s :w<CR> 283 - map <leader>q :q<CR> 284 - map <leader>r :RainbowParenthesesToggleAll<CR> 285 - nnoremap <BS> :noh<CR> 286 - map Q <Nop> 287 - nnoremap Y y$ 288 - nnoremap <leader>n :vnew<CR> 289 - " center moving 290 - nnoremap n nzzzv 291 - nnoremap N Nzzzv 292 - nnoremap J mzJ'z 293 - " undo points 294 - inoremap , ,<c-g>u 295 - inoremap . .<c-g>u 296 - inoremap ? ?<c-g>u 297 - inoremap ! !<c-g>u 298 - inoremap ) )<c-g>u 299 - inoremap [ [<c-g>u 300 - inoremap ] ]<c-g>u 301 - inoremap { {<c-g>u 302 - inoremap ( (<c-g>u 303 - inoremap } }<c-g>u 304 - " moving text 305 - vnoremap J :m '>+1<CR>gv=gv 306 - vnoremap K :m '>-2<CR>gv=gv 307 - inoremap <c-j> <esc>:m .+1<CR>== 308 - inoremap <c-k> <esc>:m .-2<CR>== 309 - nnoremap <leader>j <esc>:m .+1<CR>== 310 - nnoremap <leader>k <esc>:m .-2<CR>== 311 - " Pasting 312 - :map <leader>sy :!xclip -i<CR><CR> 313 - :vmap <leader>sy "*y 314 - :map <leader>sp :r!xclip -o<CR> 315 - 316 - " barbar 317 - nnoremap <silent> gT :BufferPrevious<CR> 318 - nnoremap <silent> gt :BufferNext<CR> 319 - nnoremap <silent> gj :BufferPick<CR> 320 - nnoremap <silent> gq :BufferClose<CR> 321 - 322 - " git 323 - nnoremap <leader>ga :G fetch --all 324 - nmap <leader>gs :G<CR> 325 - nmap <leader>gl :diffget //3<CR> 326 - nmap <leader>gh :diffget //2<CR> 327 - nmap <leader>gb :GBranches<CR> 328 - nnoremap <leader>gp :Git! push<CR> 329 - nnoremap <leader>gd :Gdiff<CR> 330 - nnoremap <leader>gc :G commit -v -q %:p<CR> 331 - 332 - " kitaab 333 - map <leader>cz :VimwikiIndex<CR>:ZettelNew 334 - map <leader>zs :ZettelSearch<CR> 335 - map <leader>zn :ZettelNew<CR> 336 - map <leader>zo :ZettelOpen<CR> 337 - map <leader>zf :Telescope oldfiles only_cwd=true<CR> 338 - map <leader>wt :VimwikiMakeTomorrowDiaryNote 339 - map <leader>wd :VimwikiMakeYesterdayDiaryNote 340 - map <leader>zm :ZenMode<CR>:setlocal nospell<CR> 341 - let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 1 }] 342 - let g:sync_taskwarrior = 0 343 - let g:zettel_format = "%y%m%d-%H%M" 344 - let g:vimwiki_list = [{'path': '~/kitaab/vimwiki', 'nested_syntaxes': {'python': 'python', 'c++': 'cpp', 'nix': 'nix', 'bash': 'sh'}}] 345 - 346 - let g:mapleader="\<Space>" 347 - 348 - " fzf 349 - " not sure we even use this 350 - let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } } 351 - 352 - " lsp commands 353 - nnoremap <leader>vgd :lua vim.lsp.buf.definition()<CR> 354 - nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR> 355 - nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR> 356 - nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR> 357 - " nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR> 358 - " nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR> 359 - " nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR> 360 - " nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR> 361 - " nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR> 362 - " nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr> 363 - " lspsaga stuff doesn't work 364 - nnoremap <leader>vd :Lspsaga peek_definition<CR> 365 - nnoremap <leader>vrn :Lspsaga rename<CR><CR> 366 - nnoremap <leader>vh :Lspsaga hover_doc<CR> 367 - nnoremap <leader>vca :Lspsaga code_action<CR> 368 - nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR> 369 - nnoremap <leader>vs :Dasht<Space> 370 - nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR> 371 - nnoremap <leader>vo :LSoutlineToggle<CR> 372 - 373 - " dashboard 374 - let g:dashboard_custom_header = [ 375 - \' ', 376 - \' ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', 377 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⣿⠁⠀⠀⠀⠀⠀⠀⠀⢠⣿⣶⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 378 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣧⠀⠀⠀⠀⠀⠀⠀⠀⢻⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 379 - \'⠀⠀⠀⠀⠀⠀⠀⢴⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⡆⠀⠀⠀⠀⠀⠀ ', 380 - \'⠀⠀⠀⠀⠀⠀⠀⠈⢿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⠟⠉⠀⠀⠀⠀⠀⠀⠀ ', 381 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠶⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 382 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 383 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 384 - \'⠀⠀⠀⠀⠀⠀⠀⢀⣀⡤⠤⠤⠖⣒⠒⡖⠲⡦⣤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣤⣤⣤⣤⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 385 - \'⠀⠀⠀⠀⠀⣠⢶⠉⠩⢀⣠⡤⠤⠯⠬⠥⣼⣅⡃⠸⠉⠛⡷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⢶⢻⢻⢹⣃⣨⣧⣤⣴⣹⣉⠛⢶⣄⠀⠀⠀⠀⠀⠀ ', 386 - \'⠀⠀⠀⣰⠞⠁⢈⡤⠚⠉⠀⠀⠘⣆⡀⠀⡀⠀⠉⠙⠲⢼⣰⢡⣟⢶⣄⠀⠀⠀⠀⠀⠀⠀⢀⣠⠶⡟⣇⣺⠾⠋⠉⠁⠀⠀⠀⠀⠀⠉⠙⠳⢿⣷⣄⠀⠀⠀⠀ ', 387 - \'⠀⢀⡼⡁⢸⣰⠏⠀⠀⠀⠀⠀⠀⠘⡞⠀⠀⠀⠀⠀⠀⠀⠉⠻⣿⡞⡼⣷⣄⠀⠀⠀⣠⣾⠛⠄⣷⠟⠋⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⢠⠀⠈⠻⣧⠀⠀⠀ ', 388 - \'⠀⡼⠁⢀⡼⠁⠀⠀⠀⣀⠤⠖⠛⠛⠛⠛⠓⠲⠤⣄⡀⠀⠀⠀⠀⠻⢷⣿⣿⣷⣤⣾⠹⢌⡷⠛⠁⠀⠀⠀⠀⣀⡤⠔⠛⠉⠉⠈⠉⠛⠲⣄⣇⠀⠀⠙⣷⠀⠀ ', 389 - \'⢰⠷⣀⡜⠁⠀⠀⢀⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠲⣤⡀⢀⡤⠚⢻⣿⣿⢣⢈⡴⠋⠀⠀⠀⠀⣠⠔⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⡇⠀⠀⠘⣇⠀ ', 390 - \'⣾⣇⣹⢃⡀⠀⢀⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣷⣾⣞⡇⢹⡼⠋⠀⠀⠀⢠⡴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀⠀⠀⢹⠀ ', 391 - \'⢹⢀⣿⠘⡇⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢟⢱⢹⡾⠋⠀⠀⠀⣠⣾⣿⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⢸⡀ ', 392 - \'⢸⣅⣯⠀⣆⠀⢸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢻⣹⢸⡼⠋⠀⠀⠀⢀⡼⢻⣻⣿⡽⡹⠳⢤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡾⠀⠀⠀⢸⠀ ', 393 - \'⠈⣿⣿⡀⠘⠀⠈⣿⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⢾⢻⢿⣿⠟⠋⠀⠀⠀⠀⣠⣟⠘⣿⡏⠋⠻⢥⣃⡎⣽⠻⢦⣄⣀⠀⠀⠀⠀⠀⣀⡴⣾⠃⠀⠀⠀⡼⠀ ', 394 - \'⠀⠙⣎⣧⠀⠀⠀⠈⢻⣍⠓⠲⣶⣶⣶⣶⡖⢋⣿⣏⡧⠞⠋⠁⠀⠀⠀⢀⣤⠞⠁⠈⠻⣷⣧⠀⡀⠀⠉⠓⢧⣇⢰⢈⠙⢻⠒⡖⢲⠚⣍⡴⠃⠀⠀⠀⣴⠃⠀ ', 395 - \'⠀⠀⠙⢾⣷⡀⠀⠀⠀⠈⠙⠓⠾⠿⠾⠿⠿⠚⠉⠁⠀⠀⠀⠀⠀⣠⡴⠛⠁⠀⠀⠀⠀⠀⠙⠷⣝⠣⠀⠀⠀⠈⠉⠒⠶⠾⠤⠧⠼⠚⠉⠀⠀⠀⢀⡴⠃⠀⠀ ', 396 - \'⠀⠀⠀⠀⠙⠿⣦⣀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⢀⣠⡴⠞⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠶⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⢀⡴⠟⠁⠀⠀⠀ ', 397 - \'⠀⠀⠀⠀⠀⠀⠀⠈⠛⠒⠤⠤⣄⣀⣀⣀⣠⠤⠤⠶⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠒⠦⠤⢤⣀⣀⣠⡤⠤⠟⠋⠀⠀⠀⠀⠀⠀ ', 398 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 399 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 400 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡶⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 401 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀ ', 402 - \'⠀⠀⠀⠀⠀⠀⢀⣴⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣦⣀⠀⠀⠀⠀⠀⠀ ', 403 - \'⠀⠀⠀⠀⠀⠘⠻⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⠏⠀⠀⠀⠀⠀⠀⠀⠀⠰⡆⠀⠀⠀⠀⠀⠀⠀⠀⠹⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠽⠟⠁⠀⠀⠀⠀⠀ ', 404 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 405 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠿⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 406 - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', 407 - \] 408 - let g:dashboard_default_executive = 'telescope' 409 - nmap <Leader>ss :<C-u>SessionSave<CR> 410 - nmap <Leader>sl :<C-u>SessionLoad<CR> 411 - " nnoremap <silent> <Leader>fh :DashboardFindHistory<CR> 412 - " nnoremap <silent> <Leader>fm :DashboardJumpMark<CR> 413 - " nnoremap <silent> <Leader>cn :DashboardNewFile<CR> 414 - autocmd FileType dashboard set showtabline=0 | autocmd WinLeave <buffer> set showtabline=2 415 - let g:dashboard_custom_footer = ["Run wild"] 416 - let g:dashboard_custom_section={ 417 - \ 'create_zettel': { 418 - \ 'description': [' Create Zettel SPC c z'], 419 - \ 'command': ':VimwikiIndex' }, 420 - \ 'load_session': { 421 - \ 'description': [' Load Session SPC s l'], 422 - \ 'command': 'SessionLoad' } 423 - \ } 424 - 425 - let g:scnvim_snippet_format = "luasnip" 426 - 427 - 428 - " lua config 429 - lua <<EOF 430 - local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } 431 - for type, icon in pairs(signs) do 432 - local hl = "DiagnosticSign" .. type 433 - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) 434 - end 435 - vim.g.diagnostics_active = true 436 - function _G.toggle_diagnostics() 437 - if vim.g.diagnostics_active then 438 - vim.g.diagnostics_active = false 439 - vim.lsp.diagnostic.clear(0) 440 - vim.lsp.handlers["textDocument/publishDiagnostics"] = function() end 441 - else 442 - vim.g.diagnostics_active = true 443 - vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( 444 - vim.lsp.diagnostic.on_publish_diagnostics, { 445 - virtual_text = true, 446 - signs = true, 447 - underline = true, 448 - update_in_insert = false, 449 - } 450 - ) 451 - end 452 - end 453 - 454 - vim.diagnostic.config({ 455 - signs = true, 456 - update_in_insert = false, 457 - underline = false, 458 - severity_sort = true, 459 - float = { 460 - focusable = false, 461 - style = 'minimal', 462 - border = 'rounded', 463 - source = 'always', 464 - }, 465 - }) 466 - 467 - vim.lsp.handlers['textDocument/hover'] = vim.lsp.with( 468 - vim.lsp.handlers.hover, 469 - { 470 - border = 'rounded', 471 - } 472 - ) 473 - 474 - vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with( 475 - vim.lsp.handlers.signature_help, 476 - { 477 - border = 'rounded', 478 - } 479 - ) 480 - 481 - local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview 482 - function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...) 483 - opts = opts or {} 484 - opts.border = opts.border or 'rounded' 485 - return orig_util_open_floating_preview(contents, syntax, opts, ...) 486 - end 487 - 488 - 489 - vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true}) 490 - 491 - -- autopairs 492 - require('nvim-autopairs').setup{} 493 - 494 - -- marks 495 - require('marks').setup{} 496 - 497 - -- Setup nvim-cmp. 498 - local has_words_before = function() 499 - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) 500 - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil 501 - end 502 - 503 - local luasnip = require("luasnip") 504 - local lspkind = require("lspkind") 505 - local cmp = require('cmp') 506 - local cmp_autopairs = require('nvim-autopairs.completion.cmp') 507 - local t = function(str) 508 - return vim.api.nvim_replace_termcodes(str, true, true, true) 509 - end 510 - local check_back_space = function() 511 - local col = vim.fn.col(".") - 1 512 - return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil 513 - end 514 - cmp.setup { 515 - formatting = { 516 - format = lspkind.cmp_format({ 517 - mode = 'symbol_text', 518 - maxwidth = 50, 519 - }) 520 - }, 521 - mapping = { 522 - ['<C-p>'] = cmp.mapping.select_prev_item(), 523 - ['<C-n>'] = cmp.mapping.select_next_item(), 524 - ['<C-d>'] = cmp.mapping.scroll_docs(-4), 525 - ['<C-f>'] = cmp.mapping.scroll_docs(4), 526 - ['<C-Space>'] = cmp.mapping.complete(), 527 - ['<C-e>'] = cmp.mapping.close(), 528 - ['<CR>'] = cmp.mapping.confirm({ 529 - behavior = cmp.ConfirmBehavior.Insert, 530 - select = true 531 - }), 532 - ["<Tab>"] = cmp.mapping(function(fallback) 533 - if cmp.visible() then 534 - cmp.select_next_item() 535 - elseif luasnip.expand_or_jumpable() then 536 - luasnip.expand_or_jump() 537 - elseif has_words_before() then 538 - cmp.complete() 539 - else 540 - fallback() 541 - end 542 - end, {"i", "s"}), 543 - ["<S-Tab>"] = cmp.mapping(function(fallback) 544 - if cmp.visible() then 545 - cmp.select_prev_item() 546 - elseif luasnip.jumpable(-1) then 547 - luasnip.jump(-1) 548 - else 549 - fallback() 550 - end 551 - end, { "i", "s" }), 552 - }, 553 - snippet = { 554 - expand = function(args) 555 - require'luasnip'.lsp_expand(args.body) 556 - end 557 - }, 558 - sources = { 559 - {name = 'buffer'}, {name = 'nvim_lsp'}, 560 - {name = "look"}, {name = "path"}, 561 - {name = "calc"}, {name = "spell"}, 562 - {name = 'cmp-conjure'}, {name = "luasnip"}, 563 - {name = 'tags'} 564 - }, 565 - completion = {completeopt = 'menu,menuone,noinsert'} 566 - } 567 - cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } })) 568 - require("luasnip.loaders.from_vscode").lazy_load() 569 - 570 - -- null-ls 571 - -- being very janky 572 - local null_ls = require("null-ls") 573 - null_ls.setup({ 574 - sources = { 575 - null_ls.builtins.diagnostics.shellcheck, 576 - null_ls.builtins.diagnostics.proselint.with({ filetypes = { "vimwiki", "mail", }, }), 577 - null_ls.builtins.diagnostics.commitlint, 578 - null_ls.builtins.diagnostics.jsonlint, 579 - -- null_ls.builtins.code_actions.statix, 580 - -- null_ls.builtins.diagnostics.clj_kondo, 581 - -- null_ls.builtins.formatting.isort, 582 - -- null_ls.builtins.formatting.black, 583 - }, 584 - }) 585 - 586 - -- Setup lspconfig 587 - require("lsp-format").setup {} 588 - require("nvim-navic").setup {} 589 - local format = require("lsp-format") 590 - local navic = require("nvim-navic") 591 - 592 - -- lspsaga, code_action lightbulb is annoying 593 - local saga = require('lspsaga') 594 - saga.init_lsp_saga({ 595 - border_style = "rounded", 596 - code_action_icon = "", 597 - code_action_num_shortcut = true, 598 - code_action_lightbulb = { 599 - enable = false, 600 - enable_in_insert = false, 601 - cache_code_action = true, 602 - sign = true, 603 - update_time = 150, 604 - sign_priority = 20, 605 - virtual_text = false, 606 - }, 607 - code_action_keys = { 608 - quit = 'q', 609 - exec = '<CR>', 610 - }, 611 - -- show outline 612 - show_outline = { 613 - win_position = 'right', 614 - --set special filetype win that outline window split.like NvimTree neotree 615 - -- defx, db_ui 616 - auto_enter = true, 617 - auto_preview = true, 618 - virt_text = '┃', 619 - jump_key = 'o', 620 - -- auto refresh when change buffer 621 - auto_refresh = true, 622 - }, 623 - }) 624 - 625 - capabilities = require('cmp_nvim_lsp').default_capabilities() 626 - 627 - local lspconfig = require('lspconfig') 628 - -- fennel-ls is bleeding edge 629 - -- require("lspconfig.configs")["fennel-ls"] = { 630 - -- default_config = { 631 - -- cmd = {"fennel-ls"}, 632 - -- filetypes = {"fennel"}, 633 - -- root_dir = function(dir) return lspconfig.util.find_git_ancestor(dir) end, 634 - -- settings = {} 635 - -- } 636 - -- } 637 - 638 - local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'lua_ls'} 639 - for _, lsp in ipairs(servers) do 640 - lspconfig[lsp].setup { 641 - on_attach = function(client, bufnr) 642 - format.on_attach(client) 643 - navic.attach(client, bufnr) 644 - end, 645 - capabilities = capabilities, 646 - } 647 - end 648 - -- rnix doesn't support gps 649 - lspconfig['rnix'].setup { 650 - on_attach = function(client, bufnr) 651 - format.on_attach(client) 652 - end, 653 - capabilities = capabilities, 654 - } 655 - -- fennel-ls doesn't support gps 656 - -- lspconfig['fennel-ls'].setup { 657 - -- on_attach = function(client, bufnr) 658 - -- format.on_attach(client) 659 - -- end, 660 - -- capabilities = capabilities, 661 - -- } 662 - 663 - -- deprecated pylsp 664 - -- require('lspconfig').pylsp.setup { 665 - -- on_attach = function(client, bufnr) 666 - -- format.on_attach(client) 667 - -- navic.attach(client, bufnr) 668 - -- end, 669 - -- capabilities = capabilities, 670 - -- settings = { 671 - -- pylsp = { 672 - -- configurationSources = { "flake8", "mypy", "black" }, 673 - -- plugins = { 674 - -- black = {enabled = true}, 675 - -- jedi_signature_help = {enabled = true}, 676 - -- jedi_completion = { include_params = true }, 677 - -- pylsp_mypy={ enabled = true }, 678 - -- pycodestyle={ 679 - -- enabled=true, 680 - -- ignore={'E501', 'E231'}, 681 - -- maxLineLength=120, 682 - -- }, 683 - -- }, 684 - -- }, 685 - -- }, 686 - -- } 687 - 688 - require('gitsigns').setup { sign_priority=80 } 689 - 690 - -- treesitter 691 - require('nvim-treesitter.configs').setup { 692 - -- parser_install_dir = "~/.local/share/nvim/site/parser/", 693 - -- ensure_installed={'nix', 'clojure', 'python', 'fennel', 'lua', 'html', 'css', 'regex', 'supercollider', 'beancount', 'janet'}, 694 - highlight = { enabled = true, additional_vim_regex_highting = true, }, 695 - textobjects = { enabled = true }, 696 - } 697 - -- 'glsl' needs c++ compiler lol 698 - 699 - -- lualine 700 - local navic = require("nvim-navic") 701 - require('lualine').setup { 702 - options = { theme = 'ayu' }, 703 - sections = { 704 - lualine_c = { 705 - 'filename', { navic.get_location, condition=navic.is_available }, 706 - }, 707 - lualine_y = { 708 - function() 709 - local msg = 'No Active Lsp' 710 - local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype') 711 - local clients = vim.lsp.get_active_clients() 712 - if next(clients) == nil then 713 - return msg 714 - end 715 - for _, client in ipairs(clients) do 716 - local filetypes = client.config.filetypes 717 - if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then 718 - return client.name 719 - end 720 - end 721 - return msg 722 - end 723 - }, 724 - lualine_x = {'filetype'} 725 - } 726 - } 727 - 728 - -- nvim-lint 729 - -- require('lint').linters_by_ft = { 730 - -- markdown = {'vale'}, 731 - -- } 732 - 733 - -- f_term 734 - local map = vim.api.nvim_set_keymap 735 - local opts = { noremap = true, silent = true } 736 - map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts) 737 - map('t', '<A-i>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts) 738 - 739 - -- Custom functions 740 - function update_date() 741 - local time = os.date("%Y-%m-%d %H:%M") 742 - local message = "%update " .. time 743 - local lines = vim.api.nvim_buf_get_lines(0, 0,4,false) 744 - for i=1,4,1 do 745 - if (lines[i]:len() == 0) then 746 - vim.api.nvim_buf_set_lines(0, i-1, i, false, {message, ""}) 747 - return 748 - end 749 - end 750 - if (lines[4]:len() ~= 0) then 751 - vim.api.nvim_buf_set_lines(0, 3, 4, false, {message}) 752 - end 753 - return 754 - end 755 - 756 - vim.api.nvim_create_autocmd( 757 - "BufWritePre", 758 - { pattern = { "*.wiki" }, callback = update_date} 759 - ) 760 - 761 - -- set spelling for text files 762 - vim.api.nvim_create_autocmd( 763 - { "BufRead", "BufNewFile" }, 764 - { pattern = { "*.wiki", "*.txt", "*.md", "*.tex" }, 765 - command = "setlocal spell" } 766 - ) 767 - vim.api.nvim_create_autocmd( 768 - "FileType", 769 - { pattern = { "mail" }, 770 - command = "setlocal spell" } 771 - ) 772 - 773 - -- auto session 774 - require('auto-session').setup { 775 - log_level = 'info', 776 - auto_session_suppress_dirs = {'~/'} 777 - } 778 - vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal" 779 - 780 - require("which-key").setup{} 781 - require('leap').set_default_keymaps() 782 - 783 - -- supercollider 784 - -- local scnvim = require 'scnvim' 785 - -- local map = scnvim.map 786 - -- local map_expr = scnvim.map_expr 787 - -- scnvim.setup { 788 - -- keymaps = { 789 - -- ['<localleader>e'] = map('editor.send_line', {'i', 'n'}), 790 - -- ['<localleader>s'] = map_expr('CmdPeriod.run', {'i', 'n'}), 791 - -- ['<localleader>t'] = { 792 - -- map('editor.send_block', {'i', 'n'}), 793 - -- map('editor.send_selection', 'x'), 794 - -- }, 795 - -- ['<CR>'] = map('postwin.toggle'), 796 - -- ['<M-CR>'] = map('postwin.toggle', 'i'), 797 - -- ['<M-L>'] = map('postwin.clear', {'n', 'i'}), 798 - -- ['<C-k>'] = map('signature.show', {'n', 'i'}), 799 - -- ['<F12>'] = map('sclang.hard_stop', {'n', 'x', 'i'}), 800 - -- ['<leader>st'] = map('sclang.start'), 801 - -- ['<leader>sk'] = map('sclang.recompile'), 802 - -- ['<F1>'] = map_expr('s.boot'), 803 - -- ['<F2>'] = map_expr('s.meter'), 804 - -- } 805 - -- } 806 - -- You gotta run :SCNvimGenerateAssets for this first 807 - -- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets()) 808 - 809 - -- zen mode 810 - require('zen-mode').setup{ 811 - window = { 812 - backdrop = 1.0, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal 813 - -- height and width can be: 814 - -- * an absolute number of cells when > 1 815 - -- * a percentage of the width / height of the editor when <= 1 816 - -- * a function that returns the width or the height 817 - width = 120, -- width of the Zen window 818 - height = 1, -- height of the Zen window 819 - -- by default, no options are changed for the Zen window 820 - -- uncomment any of the options below, or add other vim.wo options you want to apply 821 - options = { 822 - signcolumn = "no", -- disable signcolumn 823 - number = false, -- disable number column 824 - relativenumber = false, -- disable relative numbers 825 - cursorline = false, -- disable cursorline 826 - cursorcolumn = false, -- disable cursor column 827 - foldcolumn = "0", -- disable fold column 828 - list = false, -- disable whitespace characters 829 - }, 830 - }, 831 - plugins = { 832 - -- disable some global vim options (vim.o...) 833 - -- comment the lines to not apply the options 834 - options = { 835 - enabled = true, 836 - ruler = false, -- disables the ruler text in the cmd line area 837 - showcmd = false, -- disables the command in the last line of the screen 838 - }, 839 - twilight = { enabled = true }, -- enable to start Twilight when zen mode opens 840 - gitsigns = { enabled = false }, -- disables git signs 841 - tmux = { enabled = false }, -- disables the tmux statusline 842 - -- this will change the font size on kitty when in zen mode 843 - -- to make this work, you need to set the following kitty options: 844 - -- - allow_remote_control socket-only 845 - -- - listen_on unix:/tmp/kitty 846 - kitty = { 847 - enabled = true, 848 - font = "+2", -- font size increment 849 - }, 850 - }, 851 - } 852 - require('twilight').setup{} 853 - 854 - -- hologram 855 - require('hologram').setup{ 856 - auto_display = false -- WIP automatic markdown image display, may be prone to breaking 857 - } 858 - 859 - EOF 860 - 861 - ''; 862 - extraPackages = with pkgs // customPlugins; [ 863 - # used to compile tree-sitter grammar 864 - python-with-my-packages 10 + package = pkgs.unstable.neovim-unwrapped; 11 + extraPackages = with pkgs; [ 12 + # used for Cody 865 13 nodejs 866 - # clojure-lsp 867 - clojure 868 - rnix-lsp 869 - terraform-lsp 870 - rust-analyzer 871 - # clj-kondo 872 - zls 873 - gcc 874 - nodePackages_latest.pyright 875 - shellcheck 876 - proselint 877 - statix 878 - nodePackages.typescript 879 - nodePackages.typescript-language-server 880 - luajitPackages.lua-lsp 881 - # fennel-ls 882 14 ]; 883 15 884 - plugins = with pkgs.vimPlugins // customPlugins; [ 885 - # ui 886 - lualine-nvim 887 - fzf-vim 888 - nerdtree 889 - neovim-ayu 890 - rainbow_parentheses-vim 891 - vim-surround 892 - vim-devicons 893 - nvim-web-devicons 894 - undotree 895 - telescope-nvim 896 - plenary-nvim 897 - nvim-navic 898 - (nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.python p.fennel p.lua p.html p.css p.regex p.beancount p.markdown p.glsl p.yaml p.toml p.dockerfile p.json ])) 899 - nvim-treesitter-context 900 - my-fterm 901 - barbar-nvim 902 - auto-session 903 - my-marks 904 - which-key-nvim 905 - nvim-peekup 906 - zen-mode-nvim 907 - twilight-nvim 908 - my-lspsaga 909 - vim-dasht 910 - 911 - # language 912 - vim-nix 913 - vim-elixir 914 - emmet-vim 915 - csv-vim 916 - direnv-vim 917 - zig-vim 918 - conjure 919 - 920 - # kitaab stuff 921 - vimwiki 922 - taskwiki 923 - vim-zettel 924 - hologram-nvim 925 - 926 - # lsp stuff 927 - # nvim-lint 928 - null-ls-nvim 929 - nvim-lspconfig 930 - nvim-cmp 931 - cmp-nvim-lsp 932 - cmp-treesitter 933 - nvim-lsp-ts-utils 934 - cmp-conjure 935 - cmp-buffer 936 - cmp-path 937 - cmp-spell 938 - nvim-autopairs 939 - cmp_luasnip 940 - luasnip 941 - lsp-format 942 - friendly-snippets 943 - lspkind-nvim 944 - 945 - # git stuff 946 - vim-fugitive 947 - gitsigns-nvim 948 - fzf-checkout-vim 949 - 950 - # Clojure stuff 951 - # conjure 952 - vim-sexp 953 - vim-sexp-mappings-for-regular-people 954 - fennel-vim 955 - 956 - # vim-tidal 957 - # experimental 958 - nvim-luapad 959 - # scnvim 960 - leap 961 - vim-beancount 962 - # vimtex 963 - # custom 964 - yuck-vim 965 - nvim-parinfer 966 - # vim-processing 967 - ]; 968 - withPython3 = true; 969 - extraPython3Packages = pkgs: with pkgs; [ tasklib six ]; 970 16 vimAlias = true; 971 17 }; 972 18 }
-9
home/profiles/nvim/package.json
··· 1 - { 2 - "console.log": { 3 - "prefix": "clog", 4 - "body": [ 5 - "console.log('$1')" 6 - ], 7 - "description": "Log output to console" 8 - } 9 - }
+8
hosts/darwin/casks/default.nix
··· 5 5 homebrew.brews = [ 6 6 "kind" 7 7 "kubectl" 8 + "bazelisk" 9 + "sourcegraph/src-cli/src-cli" 10 + "gh" 11 + # "postgresql@15" 12 + # "redis" 8 13 ]; 9 14 homebrew.casks = [ 10 15 # Development Tools 11 16 "homebrew/cask/docker" 17 + # "syncthing" 12 18 # "insomnia" 13 19 # "tableplus" 14 20 # "ngrok" 15 21 "postico" 16 22 "wireshark" 23 + "1password" 24 + "orbstack" 17 25 18 26 # Communication Tools 19 27 # Already installed manually
+29 -6
hosts/darwin/default.nix
··· 1 - { agenix, config, pkgs, ... }: 1 + { self, pkgs, ... }: 2 2 3 3 { 4 4 imports = [ 5 5 ./sketchybar 6 6 ./yabai 7 - ./casks 8 - # ../../modules/darwin/secrets.nix 7 + # ./casks 9 8 # ../../modules/darwin/home-manager.nix 10 9 # ../../modules/shared 11 10 # ../../modules/shared/cachix 12 - # agenix.darwinModules.default 13 11 ]; 14 12 15 13 environment.systemPackages = [ 16 14 pkgs.go 15 + pkgs.python3 16 + pkgs.cargo 17 + pkgs.k9s 18 + pkgs.kubernetes-helm 17 19 ]; 18 20 21 + # age.secrets.curve-wg.file = "${self}/secrets/work-wg.age"; 22 + # age.secrets.curve-wg.owner = "anishlakhwara"; 23 + # networking.wg-quick.interfaces = { 24 + # wg0 = { 25 + # address = [ "10.0.69.7/24" ]; 26 + # listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers) 27 + # privateKeyFile = "/run/agenix/work-wg"; 28 + # peers = [ 29 + # # For a client configuration, one peer entry for the server will suffice. 30 + # { 31 + # publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI="; 32 + # allowedIPs = [ "10.0.69.0/24" ]; 33 + # # Set this to the server IP and port. 34 + # endpoint = "sealight.xyz:60990"; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577 35 + # persistentKeepalive = 25; 36 + # } 37 + # ]; 38 + # }; 39 + # }; 40 + 19 41 # Auto upgrade nix package and the daemon service. 20 42 services.nix-daemon.enable = true; 21 43 nixpkgs.hostPlatform = "aarch64-darwin"; ··· 48 70 # ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; }); 49 71 50 72 # Enable fonts dir 51 - fonts.fontDir.enable = true; 52 - fonts.fonts = with pkgs; [ 73 + # fonts.fontDir.enable = true; 74 + fonts.packages = with pkgs; [ 53 75 fira-code 54 76 fira-code-symbols 55 77 hermit ··· 105 127 mouse-over-hilite-stack = true; 106 128 orientation = "bottom"; 107 129 tilesize = 48; 130 + mru-spaces = false; 108 131 }; 109 132 110 133 finder = {
-26
modules/darwin/casks.nix
··· 1 - _: 2 - 3 - [ 4 - # Development Tools 5 - "homebrew/cask/docker" 6 - # "insomnia" 7 - # "tableplus" 8 - # "ngrok" 9 - "postico" 10 - "wireshark" 11 - 12 - # Communication Tools 13 - "loom" 14 - # Already installed manually 15 - # "slack" 16 - # "zoom" 17 - 18 - # Utility Tools 19 - "syncthing" 20 - 21 - # Productivity Tools 22 - "raycast" 23 - 24 - # AI 25 - # "diffusionbee" 26 - ]
+3
secrets/secrets.nix
··· 6 6 lituus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2lAb33LH3JNuOfBXt971u0tHe+NURFecQdfjwEj+C+ root@lituus"; 7 7 helix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKrL6IDHNnHmxi0q9nzu87NOyidPm3HpE7klU368lEf root@helix"; 8 8 helix2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2G81z1E51ioJQGLHnTJEjgSdBqLM6mb72Z+0atE6Bf root@helix"; 9 + work = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHOnfDvR2D2nGnC+DZYDUXiokzz+eLfZwkp+O8WjWutp anishlakhwara@Anishs-MacBook-Pro.local"; 9 10 curve = [ system user ]; 10 11 allUserKeys = [ system user mossnet ]; 11 12 systemOnly = [ system mossnet lituus helix ]; ··· 34 35 "box-wg.age".publicKeys = [ mossnet ]; 35 36 "wallabag-password.age".publicKeys = [ mossnet ]; 36 37 "wallabag-secret.age".publicKeys = [ mossnet ]; 38 + 39 + "work-wg.age".publicKeys = [ work user system ]; 37 40 }
secrets/work-wg.age

This is a binary file and will not be displayed.