mirror of
				https://github.com/nmasur/dotfiles
				synced 2025-11-04 01:13:15 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			407 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			407 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  config,
 | 
						|
  lib,
 | 
						|
  ...
 | 
						|
}:
 | 
						|
 | 
						|
let
 | 
						|
  cfg = config.nmasur.presets.programs.bat;
 | 
						|
in
 | 
						|
 | 
						|
{
 | 
						|
 | 
						|
  options.nmasur.presets.programs.bat.enable = lib.mkEnableOption "Bat text pager";
 | 
						|
 | 
						|
  config = lib.mkIf cfg.enable {
 | 
						|
    programs.bat = {
 | 
						|
      enable = true; # cat replacement
 | 
						|
      config = {
 | 
						|
        theme = config.theme.colors.batTheme;
 | 
						|
        pager = "less -R"; # Don't auto-exit if one screen
 | 
						|
      };
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |