From 42c9fbc6e135da75684bb5cd87886d5280af14bc Mon Sep 17 00:00:00 2001 From: Bryan Ramos Date: Thu, 30 Apr 2026 11:01:06 -0400 Subject: [PATCH] fix(neovim): support mason tools on nixos --- system/machines/desktop/default.nix | 1 + system/machines/server/default.nix | 1 + system/machines/wsl/default.nix | 1 + system/modules/nix-ld/default.nix | 39 +++++++++++++++++++++++++++++ user/modules/neovim/nvim | 2 +- 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 system/modules/nix-ld/default.nix diff --git a/system/machines/desktop/default.nix b/system/machines/desktop/default.nix index 539aa63..16a68c0 100644 --- a/system/machines/desktop/default.nix +++ b/system/machines/desktop/default.nix @@ -11,6 +11,7 @@ ../../keys ../../modules/sops ../../modules/docker + ../../modules/nix-ld ./hardware.nix ./system.nix ]; diff --git a/system/machines/server/default.nix b/system/machines/server/default.nix index c7f50e0..57add69 100644 --- a/system/machines/server/default.nix +++ b/system/machines/server/default.nix @@ -10,6 +10,7 @@ ../../../user ../../keys ../../modules/sops + ../../modules/nix-ld ./hardware.nix ./system.nix ]; diff --git a/system/machines/wsl/default.nix b/system/machines/wsl/default.nix index 9fb4e88..2d2a831 100644 --- a/system/machines/wsl/default.nix +++ b/system/machines/wsl/default.nix @@ -10,6 +10,7 @@ ../../../user ../../keys ../../modules/sops + ../../modules/nix-ld ./system.nix ]; } diff --git a/system/modules/nix-ld/default.nix b/system/modules/nix-ld/default.nix new file mode 100644 index 0000000..efe4d81 --- /dev/null +++ b/system/modules/nix-ld/default.nix @@ -0,0 +1,39 @@ +{ pkgs, lib, config, ... }: + +with lib; +let + cfg = config.modules.system.nix-ld; + +in +{ + options.modules.system.nix-ld = { + enable = mkOption { + type = types.bool; + default = any + (user: user.modules.user.neovim.enable or false) + (attrValues config.home-manager.users); + description = "Enable nix-ld so Mason-installed Neovim tools can run on NixOS."; + }; + }; + + config = mkIf cfg.enable { + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ + curl + expat + fontconfig + freetype + glib + icu + libgcc + libGL + libxkbcommon + openssl + stdenv.cc.cc + zlib + zstd + ]; + }; + }; +} diff --git a/user/modules/neovim/nvim b/user/modules/neovim/nvim index da6106c..f11e6a0 160000 --- a/user/modules/neovim/nvim +++ b/user/modules/neovim/nvim @@ -1 +1 @@ -Subproject commit da6106c77470b336783951ff2bce795688e9663d +Subproject commit f11e6a02db5cd8e4c8c1bdec0d34557ff995c32c