From ee642c429fced7d51c5f9c9694034f6222a1186f Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Wed, 3 Dec 2025 09:57:08 -0600 Subject: [PATCH] fix minimal build with nix formatting, update all packages --- flake.lock | 78 +++++++++++++++---------------- flake.nix | 134 +++++++++-------------------------------------------- 2 files changed, 61 insertions(+), 151 deletions(-) diff --git a/flake.lock b/flake.lock index 6769bb5..429999b 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1764040936, - "narHash": "sha256-d1NFBVGQZ/Xb0pMviuzenqrfXymJs0m/pKrEg1tDGsE=", + "lastModified": 1764776358, + "narHash": "sha256-MxXSCRiV7DI5U3Ra1UxVJTTUyKsONAE8+8QdSXsGIhA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b9491974f02dadeb5acca22649ccbd89a6a81afb", + "rev": "0b8cec1eb2241336971009cdd4af641b930d0d97", "type": "github" }, "original": { @@ -82,11 +82,11 @@ "nvim_plugin-MeanderingProgrammer/render-markdown.nvim": { "flake": false, "locked": { - "lastModified": 1763430554, - "narHash": "sha256-0DwPuzqR+7R4lJFQ9f2xN26YhdQKg85Hw6+bPvloZoc=", + "lastModified": 1764732647, + "narHash": "sha256-jya61X22LbcT4hpeio3qE/oOI/lvqKpf09oGEHHvQdA=", "owner": "MeanderingProgrammer", "repo": "render-markdown.nvim", - "rev": "6e0e8902dac70fecbdd8ce557d142062a621ec38", + "rev": "b2b135347e299ffbf7f4123fb7811899b0c9f4b8", "type": "github" }, "original": { @@ -162,11 +162,11 @@ "nvim_plugin-b0o/schemastore.nvim": { "flake": false, "locked": { - "lastModified": 1763748041, - "narHash": "sha256-4KKj1zp+5Z2zbC31hpvw73BIuf4dW7rimepGOggmUp4=", + "lastModified": 1764655248, + "narHash": "sha256-9nUBzwbMkzLySMW/Y0EkFpvFgHeW5YDQ3J3moVQarjQ=", "owner": "b0o", "repo": "schemastore.nvim", - "rev": "aa25399c48236b77af71d4b64cdf157d2ba4e990", + "rev": "e9c00ea7813006dfa29f35c174f83f0184d45a93", "type": "github" }, "original": { @@ -178,11 +178,11 @@ "nvim_plugin-catppuccin/nvim": { "flake": false, "locked": { - "lastModified": 1763995197, - "narHash": "sha256-i4WmQzSNWeR5rh61yonzR55yyklJ3xOL8D/XyEnDa+E=", + "lastModified": 1764084803, + "narHash": "sha256-ds+Rm9H00s++RC1dH4OQpCg1FXSm4HuwDGzr4ah0YBU=", "owner": "catppuccin", "repo": "nvim", - "rev": "180e0435707cf1fed09a98a9739e5807d92b69be", + "rev": "ce4a8e0d5267e67056f9f4dcf6cb1d0933c8ca00", "type": "github" }, "original": { @@ -194,11 +194,11 @@ "nvim_plugin-chrisgrieser/nvim-early-retirement": { "flake": false, "locked": { - "lastModified": 1764013541, - "narHash": "sha256-Mzz1y7YYTYUWv9S/Yr26to7AuDCZ+9asHa3qzDz06D0=", + "lastModified": 1764104935, + "narHash": "sha256-mvs0uIoxidy3jfC6oymwhaZVRbJrW+/kuMcIpR8TI6M=", "owner": "chrisgrieser", "repo": "nvim-early-retirement", - "rev": "6fb7d87a965e439cfb4e04a5c0e5038010fc015b", + "rev": "cd29cf40af7473530a8598245ba1d348fd5e1fa0", "type": "github" }, "original": { @@ -370,11 +370,11 @@ "nvim_plugin-lewis6991/gitsigns.nvim": { "flake": false, "locked": { - "lastModified": 1763280728, - "narHash": "sha256-w2/osNJwbtmUxxQIXBsyqMYrvyNUaVzXrUNGYqGmzi4=", + "lastModified": 1764322768, + "narHash": "sha256-w3Q7nMFEbcjP6RmSTONg2Nw1dBXDEHnjQ69FuAPJRD8=", "owner": "lewis6991", "repo": "gitsigns.nvim", - "rev": "cdafc320f03f2572c40ab93a4eecb733d4016d07", + "rev": "5813e4878748805f1518cee7abb50fd7205a3a48", "type": "github" }, "original": { @@ -466,11 +466,11 @@ "nvim_plugin-mrcjkb/rustaceanvim": { "flake": false, "locked": { - "lastModified": 1763539887, - "narHash": "sha256-aMyjQEEY6MlTBMMxjR6NxNhdbWmvRhOcfpgE1w712nE=", + "lastModified": 1764542305, + "narHash": "sha256-t7xAQ9sczLyA1zODmD+nEuWuLnhrfSOoPu/4G/YTGdU=", "owner": "mrcjkb", "repo": "rustaceanvim", - "rev": "6b7e0e18ad8fa0598bc038aef7bb6bba288adbad", + "rev": "6c3785d6a230bec63f70c98bf8e2842bed924245", "type": "github" }, "original": { @@ -482,11 +482,11 @@ "nvim_plugin-neovim/nvim-lspconfig": { "flake": false, "locked": { - "lastModified": 1763880753, - "narHash": "sha256-huuWVUKo6CmxjXYRnGv8tUs+7bo85gNyL8vVnreiTAU=", + "lastModified": 1764477618, + "narHash": "sha256-IpVDEOr//Jy+r3Z5Qo8nxDa3fNO+BTBKzAmbqvxtCQE=", "owner": "neovim", "repo": "nvim-lspconfig", - "rev": "30a2b191bccf541ce1797946324c9329e90ec448", + "rev": "effe4bf2e1afb881ea67291c648b68dd3dfc927a", "type": "github" }, "original": { @@ -594,11 +594,11 @@ "nvim_plugin-nvim-telescope/telescope.nvim": { "flake": false, "locked": { - "lastModified": 1763414201, - "narHash": "sha256-6hrylUCc6KlcbnMgcJNJhbX2Cgu0YHKoMPOqpaKRljE=", + "lastModified": 1764418954, + "narHash": "sha256-e6XSJRv4KB0z+nzGWmlV/YZNwWsyrrpQTloePRKWmw4=", "owner": "nvim-telescope", "repo": "telescope.nvim", - "rev": "83a3a713d6b2d2a408491a1b959e55a7fa8678e8", + "rev": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2", "type": "github" }, "original": { @@ -610,11 +610,11 @@ "nvim_plugin-nvim-tree/nvim-tree.lua": { "flake": false, "locked": { - "lastModified": 1763712665, - "narHash": "sha256-YwaWMPQ3IC+z/utnkZ1Tfs5tZFex9Gdf/vS9sUaMDCA=", + "lastModified": 1764713359, + "narHash": "sha256-dSaO5esPKj1y4vNyLb3AK9egmFJsmWxkGOT+etJsbRA=", "owner": "nvim-tree", "repo": "nvim-tree.lua", - "rev": "3fb91e18a727ecc0385637895ec397dea90be42a", + "rev": "59088b96a32ea47caf4976e164dbd88b86447fb7", "type": "github" }, "original": { @@ -754,11 +754,11 @@ "nvim_plugin-stevearc/conform.nvim": { "flake": false, "locked": { - "lastModified": 1763939276, - "narHash": "sha256-2TLMJdbSbMbdGn6zhZwNSUZnxVGu+Y0ZYhTjinTc7Hs=", + "lastModified": 1764743081, + "narHash": "sha256-qCjrMt3fsRbLr/iM7nFHG7oKtyTTGcse4/cJbm3odJE=", "owner": "stevearc", "repo": "conform.nvim", - "rev": "6208aefd675939cc7c8f1a57176135974dad269f", + "rev": "ffe26e8df8115c9665d24231f8a49fadb2d611ce", "type": "github" }, "original": { @@ -866,11 +866,11 @@ "nvim_plugin-zbirenbaum/copilot.lua": { "flake": false, "locked": { - "lastModified": 1763512274, - "narHash": "sha256-NMIXOb/20aEmXvPgSDPzVuRIV+OUnJyfXVaVEuVAaTM=", + "lastModified": 1764638966, + "narHash": "sha256-wQ6SfAunVMd5tNeM7RMvrfPC2ELRibyEQboVQlU/fBs=", "owner": "zbirenbaum", "repo": "copilot.lua", - "rev": "4383e05a47493d7ff77b058c0548129eb38ec7fb", + "rev": "881f99b827d65b41f522eecc21b112cf518028ac", "type": "github" }, "original": { @@ -946,11 +946,11 @@ ] }, "locked": { - "lastModified": 1764038373, - "narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=", + "lastModified": 1764729618, + "narHash": "sha256-z4RA80HCWv2los1KD346c+PwNPzMl79qgl7bCVgz8X0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9", + "rev": "52764074a85145d5001bf0aa30cb71936e9ad5b8", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9ff10b6..e0b5cb8 100644 --- a/flake.nix +++ b/flake.nix @@ -193,9 +193,6 @@ ripgrep # search - core to telescope, checked in telescope.lua init fd # file finding - improves telescope performance, checked in telescope.lua init tree-sitter # highlighting - # including nix for minal for nice iso build - nixfmt-rfc-style # nix formatter - nil # nix lsp ]; # Core tools to prefer in PATH (prefix) @@ -207,6 +204,10 @@ glow curl sshfs + + # nix lang stuff + nixfmt-rfc-style + nil # nix ]; # Full optional tools (suffix) — linters, formatters, LSPs @@ -246,10 +247,8 @@ }) ]; - in - { - default = self.packages.${system}.neovim; - neovim = + createNeovim = + { full }: (pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped ( pkgs.neovimUtils.makeNeovimConfig { withPython3 = false; @@ -264,11 +263,18 @@ generatedWrapperArgs = old.generatedWrapperArgs or [ ] ++ [ - # Add minimal runtime dependencies to neovim path (suffix for devShell precedence) + # Add core tools, but let local devShell override "--suffix" "PATH" ":" - "${lib.makeBinPath runtimeDependencies}" + "${lib.makeBinPath runtimeDependenciesCore}" + ] + ++ lib.optionals full [ + # Add full toolchain, but let local devShell tools override + "--suffix" + "PATH" + ":" + "${lib.makeBinPath runtimeDependenciesFull}" ] ++ [ # Set the LAZY env path to the nix store, see init.lua for how it is used @@ -276,22 +282,6 @@ "LAZY" "${lazyPath}" ] - # ++ [ - # # Link avante libraries - # "--prefix" - # "LD_LIBRARY_PATH" - # ":" - # "${avante-nvim-lib}/lib" - # # Add Lua C modules path TODO make these conditional so on linux, and dylib for mac it shouldn't be both... - # "--prefix" - # "LUA_CPATH" - # ";" - # "${avante-nvim-lib}/lib/?.so" - # "--prefix" - # "LUA_CPATH" - # ";" - # "${avante-nvim-lib}/lib/?.dylib" - # ] ++ [ # Don't use default directories to not collide with another neovim config # All things at runtime should be deletable since we are using nix to handle downloads and bins @@ -345,91 +335,11 @@ "ALL_PROXY" ]; }); - - neovimFull = - (pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped ( - pkgs.neovimUtils.makeNeovimConfig { - withPython3 = false; - customRC = '' - lua ${luaNixGlobal} - luafile ${./.}/init.lua - set runtimepath^=${builtins.concatStringsSep "," (builtins.attrValues pkgs.vimPlugins.nvim-treesitter.grammarPlugins)} - ''; - } - )).overrideAttrs - (old: { - generatedWrapperArgs = - old.generatedWrapperArgs or [ ] - ++ [ - # Add core tools, but let local devShell override - "--suffix" - "PATH" - ":" - "${lib.makeBinPath runtimeDependenciesCore}" - ] - ++ [ - # Add full toolchain, but let local devShell tools override - "--suffix" - "PATH" - ":" - "${lib.makeBinPath runtimeDependenciesFull}" - ] - ++ [ - # Set the LAZY env path to the nix store, see init.lua for how it is used - "--set" - "LAZY" - "${lazyPath}" - ] - ++ [ - # Don't use default directories to not collide with another neovim config - "--run" - ''export NVIM_FLAKE_BASE_DIR="''${XDG_STATE_HOME:-$HOME/.local/state}"'' - "--run" - ''export XDG_CONFIG_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/config"'' - "--run" - ''export XDG_DATA_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/share"'' - "--run" - ''export XDG_RUNTIME_DIR="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/run"'' - "--run" - ''export XDG_STATE_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/state"'' - "--run" - ''export XDG_CACHE_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/cache"'' - "--run" - ''[ ! -d "$XDG_RUNTIME_DIR" ] && mkdir -p "$XDG_RUNTIME_DIR"'' - "--run" - '' - if [ -n "$WAYLAND_DISPLAY" ]; then - if [ ! -S "$XDG_RUNTIME_DIR/wayland-0" ]; then - mkdir -p "$XDG_RUNTIME_DIR" - ln -sf /run/user/$(id -u)/wayland-0 "$XDG_RUNTIME_DIR/wayland-0" - fi - if [ ! -S "$XDG_RUNTIME_DIR/wayland-1" ]; then - mkdir -p "$XDG_RUNTIME_DIR" - ln -sf /run/user/$(id -u)/wayland-1 "$XDG_RUNTIME_DIR/wayland-1" - fi - fi - '' - ] - ++ [ - # Clear proxy environment variables - "--unset" - "http_proxy" - "--unset" - "https_proxy" - "--unset" - "ftp_proxy" - "--unset" - "all_proxy" - "--unset" - "HTTP_PROXY" - "--unset" - "HTTPS_PROXY" - "--unset" - "FTP_PROXY" - "--unset" - "ALL_PROXY" - ]; - }); + in + { + default = self.packages.${system}.neovim; + neovim = createNeovim { full = true; }; + neovimMinimal = createNeovim { full = false; }; } ); nixosModules = { @@ -451,9 +361,9 @@ environment.systemPackages = [ ( if cfg.includeAllRuntimeDependencies then - self.packages.${pkgs.system}.neovimFull - else self.packages.${pkgs.system}.neovim + else + self.packages.${pkgs.system}.neovimMinimal ) ]; };