modules/dependencies: add direnv

This commit is contained in:
Gaetan Lepage 2025-04-07 17:26:05 +02:00 committed by nix-infra-bot
parent 7e6038a69a
commit 24aec95e3b
3 changed files with 14 additions and 13 deletions

View file

@ -10,6 +10,7 @@ let
packages = { packages = {
ctags.default = "ctags"; ctags.default = "ctags";
curl.default = "curl"; curl.default = "curl";
direnv.default = "direnv";
gcc.default = "gcc"; gcc.default = "gcc";
git = { git = {
default = "git"; default = "git";

View file

@ -1,5 +1,4 @@
{ {
pkgs,
lib, lib,
... ...
}: }:
@ -14,6 +13,14 @@ lib.nixvim.plugins.mkVimPlugin {
maintainers = [ lib.maintainers.alisonjenkins ]; maintainers = [ lib.maintainers.alisonjenkins ];
imports = [
# TODO: added 2025-04-07, remove after 25.05
(lib.nixvim.mkRemovedPackageOptionModule {
plugin = "direnv";
packageName = "direnv";
})
];
settingsOptions = { settingsOptions = {
direnv_auto = defaultNullOpts.mkFlagInt 1 '' direnv_auto = defaultNullOpts.mkFlagInt 1 ''
It will not execute `:DirenvExport` automatically if the value is `0`. It will not execute `:DirenvExport` automatically if the value is `0`.
@ -37,13 +44,7 @@ lib.nixvim.plugins.mkVimPlugin {
''; '';
}; };
extraOptions = { extraConfig = {
direnvPackage = lib.mkPackageOption pkgs "direnv" { dependencies.direnv.enable = lib.mkDefault true;
nullable = true;
};
};
extraConfig = cfg: {
extraPackages = [ cfg.direnvPackage ];
}; };
} }

View file

@ -16,9 +16,8 @@
}; };
no-packages = { no-packages = {
plugins.direnv = { plugins.direnv.enable = true;
enable = true;
direnvPackage = null; dependencies.direnv.enable = false;
};
}; };
} }