Converted direnv from nixosModule to homeModule

This commit is contained in:
alejandro-angulo 2024-07-28 20:34:53 -07:00
parent 7dfe9f87be
commit 7c5c3cd576
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
4 changed files with 23 additions and 24 deletions

View file

@ -13,6 +13,7 @@
}; };
tools = { tools = {
direnv.enable = true;
git.enable = true; git.enable = true;
}; };
}; };

View 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;
};
};
}

View file

@ -14,7 +14,6 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
aa = { aa = {
tools = { tools = {
direnv.enable = true;
eza.enable = true; eza.enable = true;
gpg.enable = true; gpg.enable = true;
zsh.enable = true; zsh.enable = true;
@ -27,6 +26,7 @@ in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
awscli2 awscli2
direnv
minio-client minio-client
pre-commit pre-commit
git git

View file

@ -1,23 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.aa.tools.direnv;
in {
options.aa.tools.direnv = with lib.types; {
enable = mkEnableOption "direnv";
};
config = mkIf cfg.enable {
aa.home.extraOptions = {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
};
};
}