From ef6be763130c5531f111af63e31f105ac3b16a8a Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 20 Apr 2024 13:39:02 +0300 Subject: [PATCH] core/build: allow paths in `additionalRuntim` an option with path in its name doesn't take a path, what a tragedy --- modules/core/build/config.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/core/build/config.nix b/modules/core/build/config.nix index 3ebec0d..1ece2d2 100644 --- a/modules/core/build/config.nix +++ b/modules/core/build/config.nix @@ -9,7 +9,7 @@ inherit (lib.strings) optionalString isString concatStringsSep; inherit (lib.misc) mapAttrsFlatten; inherit (lib.trivial) showWarnings; - inherit (lib.types) bool str oneOf attrsOf nullOr attrs submodule lines listOf; + inherit (lib.types) bool str oneOf attrsOf nullOr attrs submodule lines listOf either path; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.types) dagOf; inherit (lib.nvim.dag) entryAnywhere entryAfter topoSort mkLuarcSection mkVimrcSection; @@ -121,9 +121,14 @@ in { ''; additionalRuntimePaths = mkOption { - type = listOf str; + type = listOf (either path str); default = []; - example = literalExpression ''["./nvim"]''; + example = literalExpression '' + [ + "~/.config/nvim-extra" # absolute path, as a string - impure + ./nvim # relative path, as a path - pure + ] + ''; description = '' Additional runtime paths that will be appended to the active runtimepath of the Neovim. This can be used to