Converted direnv from nixosModule to homeModule
This commit is contained in:
		
							parent
							
								
									7dfe9f87be
								
							
						
					
					
						commit
						7c5c3cd576
					
				
					 4 changed files with 23 additions and 24 deletions
				
			
		| 
						 | 
				
			
			@ -13,6 +13,7 @@
 | 
			
		|||
    };
 | 
			
		||||
 | 
			
		||||
    tools = {
 | 
			
		||||
      direnv.enable = true;
 | 
			
		||||
      git.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										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;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,6 @@ in {
 | 
			
		|||
  config = mkIf cfg.enable {
 | 
			
		||||
    aa = {
 | 
			
		||||
      tools = {
 | 
			
		||||
        direnv.enable = true;
 | 
			
		||||
        eza.enable = true;
 | 
			
		||||
        gpg.enable = true;
 | 
			
		||||
        zsh.enable = true;
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +26,7 @@ in {
 | 
			
		|||
 | 
			
		||||
    environment.systemPackages = with pkgs; [
 | 
			
		||||
      awscli2
 | 
			
		||||
      direnv
 | 
			
		||||
      minio-client
 | 
			
		||||
      pre-commit
 | 
			
		||||
      git
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue