Converted bat from nixosModule to homeModule
This commit is contained in:
		
							parent
							
								
									c0f10df484
								
							
						
					
					
						commit
						2ad5af4f90
					
				
					 4 changed files with 50 additions and 50 deletions
				
			
		| 
						 | 
				
			
			@ -9,6 +9,7 @@
 | 
			
		|||
}: {
 | 
			
		||||
  aa = {
 | 
			
		||||
    apps = {
 | 
			
		||||
      bat.enable = true;
 | 
			
		||||
      btop.enable = true;
 | 
			
		||||
      tmux.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										21
									
								
								modules/home/apps/bat/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								modules/home/apps/bat/default.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
{
 | 
			
		||||
  config,
 | 
			
		||||
  lib,
 | 
			
		||||
  namespace,
 | 
			
		||||
  ...
 | 
			
		||||
}: let
 | 
			
		||||
  inherit (lib) mkIf mkEnableOption;
 | 
			
		||||
 | 
			
		||||
  cfg = config.${namespace}.apps.bat;
 | 
			
		||||
in {
 | 
			
		||||
  options.${namespace}.apps.bat = {
 | 
			
		||||
    enable = mkEnableOption "bat";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    programs.bat = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      config.theme = "gruvbox-dark";
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,23 +0,0 @@
 | 
			
		|||
{
 | 
			
		||||
  options,
 | 
			
		||||
  config,
 | 
			
		||||
  lib,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
with lib; let
 | 
			
		||||
  cfg = config.aa.apps.bat;
 | 
			
		||||
in {
 | 
			
		||||
  options.aa.apps.bat = with types; {
 | 
			
		||||
    enable = mkEnableOption "bat";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    aa.home.extraOptions = {
 | 
			
		||||
      programs.bat = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        config.theme = "gruvbox-dark";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,41 +1,42 @@
 | 
			
		|||
{
 | 
			
		||||
  options,
 | 
			
		||||
  config,
 | 
			
		||||
  lib,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  inputs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
with lib; let
 | 
			
		||||
}: let
 | 
			
		||||
  inherit (lib) mkIf mkEnableOption;
 | 
			
		||||
 | 
			
		||||
  cfg = config.aa.suites.utils;
 | 
			
		||||
in {
 | 
			
		||||
  options.aa.suites.utils = with lib.types; {
 | 
			
		||||
  options.aa.suites.utils = {
 | 
			
		||||
    enable = mkEnableOption "common configuration";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    aa.apps.bat.enable = true;
 | 
			
		||||
    environment.systemPackages = with pkgs; [
 | 
			
		||||
      inputs.agenix.packages.x86_64-linux.default
 | 
			
		||||
      alejandra
 | 
			
		||||
      bind # for dig
 | 
			
		||||
      curl
 | 
			
		||||
      deploy-rs
 | 
			
		||||
      du-dust
 | 
			
		||||
      fd
 | 
			
		||||
      file
 | 
			
		||||
      htop
 | 
			
		||||
      jq
 | 
			
		||||
      killall
 | 
			
		||||
      lsof
 | 
			
		||||
      pre-commit
 | 
			
		||||
      progress
 | 
			
		||||
      python3
 | 
			
		||||
      ripgrep
 | 
			
		||||
      sqlite
 | 
			
		||||
      tcpdump
 | 
			
		||||
      usbutils
 | 
			
		||||
      wget
 | 
			
		||||
    ];
 | 
			
		||||
    environment.systemPackages =
 | 
			
		||||
      (with pkgs; [
 | 
			
		||||
        alejandra
 | 
			
		||||
        bat
 | 
			
		||||
        bind # for dig
 | 
			
		||||
        curl
 | 
			
		||||
        deploy-rs
 | 
			
		||||
        du-dust
 | 
			
		||||
        fd
 | 
			
		||||
        file
 | 
			
		||||
        htop
 | 
			
		||||
        jq
 | 
			
		||||
        killall
 | 
			
		||||
        lsof
 | 
			
		||||
        pre-commit
 | 
			
		||||
        progress
 | 
			
		||||
        python3
 | 
			
		||||
        ripgrep
 | 
			
		||||
        sqlite
 | 
			
		||||
        tcpdump
 | 
			
		||||
        usbutils
 | 
			
		||||
        wget
 | 
			
		||||
      ])
 | 
			
		||||
      ++ [inputs.agenix.packages.x86_64-linux.default];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue