Converted direnv from nixosModule to homeModule
This commit is contained in:
parent
7dfe9f87be
commit
7c5c3cd576
4 changed files with 23 additions and 24 deletions
21
modules/home/tools/direnv/default.nix
Normal file
21
modules/home/tools/direnv/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.${namespace}.tools.direnv;
|
||||
in {
|
||||
options.${namespace}.tools.direnv = {
|
||||
enable = mkEnableOption "direnv";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue