nix all the things

wip: topiary-nushell

karitham.dev af70d0a7 4d2f86b3

verified
+115 -1
+93 -1
flake.lock
··· 196 196 "type": "github" 197 197 } 198 198 }, 199 + "flake-utils_4": { 200 + "inputs": { 201 + "systems": "systems_5" 202 + }, 203 + "locked": { 204 + "lastModified": 1731533236, 205 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 206 + "owner": "numtide", 207 + "repo": "flake-utils", 208 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 209 + "type": "github" 210 + }, 211 + "original": { 212 + "owner": "numtide", 213 + "repo": "flake-utils", 214 + "type": "github" 215 + } 216 + }, 199 217 "ghostty": { 200 218 "inputs": { 201 219 "flake-compat": "flake-compat", ··· 596 614 "stable": "stable", 597 615 "starship-jj": "starship-jj", 598 616 "systems": "systems_3", 617 + "topiary-nu": "topiary-nu", 599 618 "zjstatus": "zjstatus" 600 619 } 601 620 }, ··· 788 807 "type": "github" 789 808 } 790 809 }, 810 + "systems_5": { 811 + "locked": { 812 + "lastModified": 1681028828, 813 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 814 + "owner": "nix-systems", 815 + "repo": "default", 816 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 817 + "type": "github" 818 + }, 819 + "original": { 820 + "owner": "nix-systems", 821 + "repo": "default", 822 + "type": "github" 823 + } 824 + }, 825 + "topiary-nu": { 826 + "inputs": { 827 + "flake-utils": "flake-utils_3", 828 + "nixpkgs": [ 829 + "nixpkgs" 830 + ], 831 + "topiary-nushell": "topiary-nushell", 832 + "tree-sitter-nu": "tree-sitter-nu" 833 + }, 834 + "locked": { 835 + "dir": "topiary-nu", 836 + "lastModified": 1750272458, 837 + "narHash": "sha256-LqwCgzdBVh0Yz4fm/hJXDDGK1jPVkXhkxgoklPz5HLY=", 838 + "owner": "ck3mp3r", 839 + "repo": "flakes", 840 + "rev": "cd30d7afc9457c650ef719f9cf11a11dedefaf0d", 841 + "type": "github" 842 + }, 843 + "original": { 844 + "dir": "topiary-nu", 845 + "owner": "ck3mp3r", 846 + "ref": "cd30d7afc9457c650ef719f9cf11a11dedefaf0d", 847 + "repo": "flakes", 848 + "type": "github" 849 + } 850 + }, 851 + "topiary-nushell": { 852 + "flake": false, 853 + "locked": { 854 + "lastModified": 1748947526, 855 + "narHash": "sha256-mLcJR6tZclbRKbnPObqrO57AM1vjWfG13VpJCB7m5Vk=", 856 + "owner": "blindFS", 857 + "repo": "topiary-nushell", 858 + "rev": "9c770f22e54609e17cacfaf02e4943936b3f4119", 859 + "type": "github" 860 + }, 861 + "original": { 862 + "owner": "blindFS", 863 + "repo": "topiary-nushell", 864 + "type": "github" 865 + } 866 + }, 867 + "tree-sitter-nu": { 868 + "flake": false, 869 + "locked": { 870 + "lastModified": 1750158656, 871 + "narHash": "sha256-v4Nr+dN7VT4AMuejvDWJZK0+wH9/Q3h29vvAKYABaXE=", 872 + "owner": "nushell", 873 + "repo": "tree-sitter-nu", 874 + "rev": "7983592fe54750b750f2ee9dc8e89449257855d4", 875 + "type": "github" 876 + }, 877 + "original": { 878 + "owner": "nushell", 879 + "repo": "tree-sitter-nu", 880 + "type": "github" 881 + } 882 + }, 791 883 "xwayland-satellite-stable": { 792 884 "flake": false, 793 885 "locked": { ··· 853 945 "zjstatus": { 854 946 "inputs": { 855 947 "crane": "crane_2", 856 - "flake-utils": "flake-utils_3", 948 + "flake-utils": "flake-utils_4", 857 949 "nixpkgs": "nixpkgs_9", 858 950 "rust-overlay": "rust-overlay_3" 859 951 },
+4
flake.nix
··· 2 2 inputs = { 3 3 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 4 4 stable.url = "github:NixOS/nixpkgs/nixos-25.05"; 5 + topiary-nu = { 6 + url = "github:ck3mp3r/flakes?dir=topiary-nu&ref=cd30d7afc9457c650ef719f9cf11a11dedefaf0d"; 7 + inputs.nixpkgs.follows = "nixpkgs"; 8 + }; 5 9 home-manager = { 6 10 url = "github:nix-community/home-manager"; 7 11 inputs.nixpkgs.follows = "nixpkgs";
+18
modules/home/helix.nix
··· 469 469 }; 470 470 auto-format = false; 471 471 } 472 + { 473 + name = "nu"; 474 + language-servers = ["nu-lsp"]; 475 + formatter = { 476 + command = "${pkgs.writers.writeBashBin "topiary" '' 477 + export TOPIARY_LANGUAGE_DIR="${inputs'.topiary-nu.packages.default}/languages"; 478 + export TOPIARY_CONFIG_FILE="${inputs'.topiary-nu.packages.default}/languages.ncl"; 479 + 480 + ${lib.getExe pkgs.topiary} "$@" 481 + ''}/bin/topiary"; 482 + args = [ 483 + "format" 484 + "--language" 485 + "nu" 486 + ]; 487 + }; 488 + auto-format = true; 489 + } 472 490 ] 473 491 ++ map (lang: {name = lang;}) [ 474 492 "git-attributes"