nix all the things

move topiary-nu inputs in flake to auto-update them

karitham.dev e85fa9fd bbb9d5ef

verified
+100 -54
+64 -30
flake.lock
··· 205 205 "zon2nix": "zon2nix" 206 206 }, 207 207 "locked": { 208 - "lastModified": 1761017224, 209 - "narHash": "sha256-ETFcYfgn8TgRG/Z/y/tX8C2Ef1q0GoQuwt5cYiwPpyw=", 208 + "lastModified": 1761248995, 209 + "narHash": "sha256-Su1UgLLjZgKUvJDGLvwSnJV38xo7NK6nDsKNbM/lbFk=", 210 210 "owner": "ghostty-org", 211 211 "repo": "ghostty", 212 - "rev": "3548acfac63e7674b5e25896f6b393474fe8ea65", 212 + "rev": "fb5b8d7968e6d760b53785ba169c751de75ac08d", 213 213 "type": "github" 214 214 }, 215 215 "original": { ··· 246 246 "rust-overlay": "rust-overlay" 247 247 }, 248 248 "locked": { 249 - "lastModified": 1760970177, 250 - "narHash": "sha256-wV9ecNQTN1UDg2YPZGAZAU+E/KnO8eECsCbP1mT0PC8=", 249 + "lastModified": 1761141169, 250 + "narHash": "sha256-5IZjbTvP5dNTD8CbEYlNbicdGcbCN9SC9ksMm2ZEXH0=", 251 251 "owner": "helix-editor", 252 252 "repo": "helix", 253 - "rev": "2abefacad1cc18010bcc29093642e0ec082fe4ae", 253 + "rev": "d79cce4e4bfc24dd204f1b294c899ed73f7e9453", 254 254 "type": "github" 255 255 }, 256 256 "original": { ··· 266 266 ] 267 267 }, 268 268 "locked": { 269 - "lastModified": 1761005073, 270 - "narHash": "sha256-r6qbieh8iC1q1eCaWv15f4UIp8SeGffwswhNSA1Qk3s=", 269 + "lastModified": 1761266473, 270 + "narHash": "sha256-QxCyKWBmuzI+eMhYV1JmbZsiUnBNATRP1EW34OBt5Vg=", 271 271 "owner": "nix-community", 272 272 "repo": "home-manager", 273 - "rev": "84e1adb0cdd13f5f29886091c7234365e12b1e7f", 273 + "rev": "5c71d4a730bd3c972befff343bb074421e345937", 274 274 "type": "github" 275 275 }, 276 276 "original": { ··· 334 334 "xwayland-satellite-unstable": "xwayland-satellite-unstable" 335 335 }, 336 336 "locked": { 337 - "lastModified": 1760950171, 338 - "narHash": "sha256-E2ySTu/oK7cYBdAI3tlGP9zVjF4mZgWJ1OZInBCMb00=", 337 + "lastModified": 1761306170, 338 + "narHash": "sha256-CmM+0+D5vKq6QJdM7ci8DJqX16cNvbEKwUEjxIPgbpY=", 339 339 "owner": "sodiboo", 340 340 "repo": "niri-flake", 341 - "rev": "f851a923137c0a54719412146fd63d24b3214e60", 341 + "rev": "6d5497681c9c4a7d4d344b0c21b8cb5546a904b4", 342 342 "type": "github" 343 343 }, 344 344 "original": { ··· 419 419 }, 420 420 "nixpkgs-stable": { 421 421 "locked": { 422 - "lastModified": 1760862643, 423 - "narHash": "sha256-PXwG0TM7Ek87DNx4LbGWuD93PbFeKAJs4FfALtp7Wo0=", 422 + "lastModified": 1761173472, 423 + "narHash": "sha256-m9W0dYXflzeGgKNravKJvTMR4Qqa2MVD11AwlGMufeE=", 424 424 "owner": "NixOS", 425 425 "repo": "nixpkgs", 426 - "rev": "33c6dca0c0cb31d6addcd34e90a63ad61826b28c", 426 + "rev": "c8aa8cc00a5cb57fada0851a038d35c08a36a2bb", 427 427 "type": "github" 428 428 }, 429 429 "original": { ··· 477 477 }, 478 478 "nixpkgs_5": { 479 479 "locked": { 480 - "lastModified": 1760878510, 481 - "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", 480 + "lastModified": 1761114652, 481 + "narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", 482 482 "owner": "NixOS", 483 483 "repo": "nixpkgs", 484 - "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", 484 + "rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", 485 485 "type": "github" 486 486 }, 487 487 "original": { ··· 509 509 }, 510 510 "nixpkgs_7": { 511 511 "locked": { 512 - "lastModified": 1760878510, 513 - "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", 512 + "lastModified": 1761114652, 513 + "narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", 514 514 "owner": "NixOS", 515 515 "repo": "nixpkgs", 516 - "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", 516 + "rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", 517 517 "type": "github" 518 518 }, 519 519 "original": { ··· 596 596 "stable": "stable", 597 597 "starship-jj": "starship-jj", 598 598 "systems": "systems_3", 599 + "topiary-nushell": "topiary-nushell", 600 + "tree-sitter-nu": "tree-sitter-nu", 599 601 "zjstatus": "zjstatus" 600 602 } 601 603 }, ··· 693 695 }, 694 696 "stable": { 695 697 "locked": { 696 - "lastModified": 1760862643, 697 - "narHash": "sha256-PXwG0TM7Ek87DNx4LbGWuD93PbFeKAJs4FfALtp7Wo0=", 698 + "lastModified": 1761173472, 699 + "narHash": "sha256-m9W0dYXflzeGgKNravKJvTMR4Qqa2MVD11AwlGMufeE=", 698 700 "owner": "NixOS", 699 701 "repo": "nixpkgs", 700 - "rev": "33c6dca0c0cb31d6addcd34e90a63ad61826b28c", 702 + "rev": "c8aa8cc00a5cb57fada0851a038d35c08a36a2bb", 701 703 "type": "github" 702 704 }, 703 705 "original": { ··· 788 790 "type": "github" 789 791 } 790 792 }, 793 + "topiary-nushell": { 794 + "flake": false, 795 + "locked": { 796 + "lastModified": 1761178062, 797 + "narHash": "sha256-5gmLFnbHbQHnE+s1uAhFkUrhEvUWB/hg3/8HSYC9L14=", 798 + "owner": "blindFS", 799 + "repo": "topiary-nushell", 800 + "rev": "fd78be393af5a64e56b493f52e4a9ad1482c07f4", 801 + "type": "github" 802 + }, 803 + "original": { 804 + "owner": "blindFS", 805 + "repo": "topiary-nushell", 806 + "type": "github" 807 + } 808 + }, 809 + "tree-sitter-nu": { 810 + "flake": false, 811 + "locked": { 812 + "lastModified": 1761142283, 813 + "narHash": "sha256-OSazwPrUD7kWz/oVeStnnXEJiDDmI7itiDPmg062Kl8=", 814 + "owner": "nushell", 815 + "repo": "tree-sitter-nu", 816 + "rev": "18b7f951e0c511f854685dfcc9f6a34981101dd6", 817 + "type": "github" 818 + }, 819 + "original": { 820 + "owner": "nushell", 821 + "repo": "tree-sitter-nu", 822 + "type": "github" 823 + } 824 + }, 791 825 "xwayland-satellite-stable": { 792 826 "flake": false, 793 827 "locked": { ··· 808 842 "xwayland-satellite-unstable": { 809 843 "flake": false, 810 844 "locked": { 811 - "lastModified": 1759707084, 812 - "narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=", 845 + "lastModified": 1761173223, 846 + "narHash": "sha256-FumZh+fPRaKXkl9Y1uTh5KV7Io/AyOZso+UkqLhLArs=", 813 847 "owner": "Supreeeme", 814 848 "repo": "xwayland-satellite", 815 - "rev": "a9188e70bd748118b4d56a529871b9de5adb9988", 849 + "rev": "bf745144acda1343934e9a094cf9458a54d57889", 816 850 "type": "github" 817 851 }, 818 852 "original": { ··· 858 892 "rust-overlay": "rust-overlay_3" 859 893 }, 860 894 "locked": { 861 - "lastModified": 1757256304, 862 - "narHash": "sha256-qANK2Hwhi4Nbpcsy6lunncyt725gthaSX/0dLluBxtw=", 895 + "lastModified": 1761162625, 896 + "narHash": "sha256-cJD5RccT5aFwLFiId8PW91z39MpoQZIymj+qZEJ5jTE=", 863 897 "owner": "dj95", 864 898 "repo": "zjstatus", 865 - "rev": "e2ea91819408f0b0dd7ee15249341cace6eb09cc", 899 + "rev": "a4bb655af8f49fe53de7fefca54348de21ecbbb2", 866 900 "type": "github" 867 901 }, 868 902 "original": {
+13 -1
flake.nix
··· 36 36 url = "github:karitham/knixpkgs"; 37 37 inputs.nixpkgs.follows = "stable"; # use the same mesa as local system 38 38 }; 39 + 40 + tree-sitter-nu = { 41 + url = "github:nushell/tree-sitter-nu"; 42 + flake = false; 43 + }; 44 + 45 + topiary-nushell = { 46 + url = "github:blindFS/topiary-nushell"; 47 + flake = false; 48 + }; 39 49 }; 40 50 outputs = inputs @ { 41 51 self, ··· 118 128 packages = forAllSystems (pkgs: { 119 129 pokego = pkgs.callPackage ./pkgs/pokego.nix {}; 120 130 http-nu = pkgs.callPackage ./pkgs/http-nu.nix {}; 121 - topiary-nu = pkgs.callPackage ./pkgs/topiary-nu.nix {}; 131 + topiary-nu = pkgs.callPackage ./pkgs/topiary-nu.nix { 132 + inherit (inputs) tree-sitter-nu topiary-nushell; 133 + }; 122 134 }); 123 135 124 136 overlays.default = import ./overlays;
+7 -2
modules/home/helix.nix
··· 1 1 { 2 2 lib, 3 3 pkgs, 4 + inputs, 4 5 inputs', 5 6 ... 6 7 }: let ··· 472 473 { 473 474 name = "nu"; 474 475 language-servers = ["nu-lsp"]; 475 - formatter = { 476 - command = "${lib.getExe pkgs.topiary-nu}"; 476 + formatter = let 477 + tpnu = pkgs.callPackage ../../pkgs/topiary-nu.nix { 478 + inherit (inputs) topiary-nushell tree-sitter-nu; 479 + }; 480 + in { 481 + command = "${lib.getExe tpnu}"; 477 482 args = [ 478 483 "format" 479 484 "--language"
-1
overlays/default.nix
··· 1 1 _: prev: { 2 2 pokego = prev.callPackage ../pkgs/pokego.nix {}; 3 - topiary-nu = prev.callPackage ../pkgs/topiary-nu.nix {}; 4 3 golangci-lint-langserver = prev.golangci-lint-langserver.overrideAttrs (_: { 5 4 patches = prev.fetchurl { 6 5 url = "https://github.com/karitham/golangci-lint-langserver/commit/31e6806187d431a8865261b5441ef5a65b589ae5.patch";
+16 -20
pkgs/topiary-nu.nix
··· 5 5 topiary, 6 6 makeWrapper, 7 7 runCommand, 8 - fetchFromGitHub, 8 + nodejs, 9 + tree-sitter-nu, 10 + topiary-nushell, 9 11 }: let 10 - treeSitterWithLatestNu = tree-sitter.override { 11 - extraGrammars = { 12 - tree-sitter-nu = { 13 - url = "https://github.com/nushell/tree-sitter-nu"; 14 - rev = "18b7f951e0c511f854685dfcc9f6a34981101dd6"; 15 - sha256 = "sha256-OSazwPrUD7kWz/oVeStnnXEJiDDmI7itiDPmg062Kl8="; 16 - fetchSubmodules = false; 17 - }; 18 - }; 19 - }; 20 - 21 - treeSitterNu = treeSitterWithLatestNu.builtGrammars.tree-sitter-nu; 22 - 23 - topiaryNushell = fetchFromGitHub { 24 - owner = "blindFS"; 25 - repo = "topiary-nushell"; 26 - rev = "fd78be393af5a64e56b493f52e4a9ad1482c07f4"; 27 - hash = "sha256-5gmLFnbHbQHnE+s1uAhFkUrhEvUWB/hg3/8HSYC9L14="; 12 + treeSitterNu = stdenv.mkDerivation { 13 + name = "tree-sitter-nu"; 14 + src = tree-sitter-nu; 15 + buildInputs = [tree-sitter nodejs]; 16 + buildPhase = '' 17 + tree-sitter generate 18 + gcc -o parser.so -Isrc src/parser.c src/scanner.c -shared -fPIC -O2 19 + ''; 20 + installPhase = '' 21 + mkdir -p $out 22 + cp parser.so $out/parser 23 + ''; 28 24 }; 29 25 30 26 configDir = stdenv.mkDerivation { 31 27 name = "topiary-nu-config"; 32 - src = topiaryNushell; 28 + src = topiary-nushell; 33 29 34 30 buildPhase = '' 35 31 mkdir -p $out