mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
modules/dependencies: add direnv
This commit is contained in:
parent
7e6038a69a
commit
24aec95e3b
3 changed files with 14 additions and 13 deletions
|
@ -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";
|
||||||
|
|
|
@ -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 ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
no-packages = {
|
no-packages = {
|
||||||
plugins.direnv = {
|
plugins.direnv.enable = true;
|
||||||
enable = true;
|
|
||||||
direnvPackage = null;
|
dependencies.direnv.enable = false;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue