Merge branch 'flake-parts'
This commit is contained in:
		
						commit
						b221fb4781
					
				
					 230 changed files with 609 additions and 878 deletions
				
			
		
							
								
								
									
										9
									
								
								inputs/home/modules/console/shell/bash/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								inputs/home/modules/console/shell/bash/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.homeModules.console.shell.bash; | ||||
| in | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     programs.bash.enable = true; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										17
									
								
								inputs/home/modules/console/shell/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								inputs/home/modules/console/shell/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { lib, ... }: | ||||
| { | ||||
|   imports = [ | ||||
|     ./fish | ||||
|     ./bash | ||||
|     ./zsh | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.console.shell = { | ||||
|     fish = { | ||||
|       enable = lib.mkEnableOption "Enable fish configuration"; | ||||
|     }; | ||||
|     bash = { | ||||
|       enable = lib.mkEnableOption "Enable bash configuration"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										80
									
								
								inputs/home/modules/console/shell/fish/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								inputs/home/modules/console/shell/fish/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,80 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.homeModules.console.shell.fish; | ||||
|   inherit (lib) mkIf; | ||||
|   hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages; | ||||
|   hasEza = hasPackage "eza"; | ||||
|   hasBat = hasPackage "bat"; | ||||
| in | ||||
| { | ||||
|   config = { | ||||
|     programs.fish = mkIf cfg.enable { | ||||
|       enable = true; | ||||
|       shellAbbrs = { | ||||
|         fe = "cd $FLAKE; $EDITOR $FLAKE"; | ||||
|         f = "cd $FLAKE"; | ||||
|         s = "cd $SCRIPTS"; | ||||
|         tree = mkIf hasEza "eza -T --icons --group-directories-first"; | ||||
|         ls = mkIf hasEza "eza -a --icons --group-directories-first"; | ||||
|         lsd = mkIf hasEza "eza -al --icons --group-directories-first"; | ||||
|         lst = mkIf hasEza "eza -T -L 5 --icons --group-directories-first"; | ||||
|         lsta = mkIf hasEza "eza -T --icons --group-directories-first"; | ||||
|         cat = mkIf hasBat "bat"; | ||||
|       }; | ||||
|       functions = { | ||||
|         fish_greeting = ""; | ||||
|         fish_flake_edit = '' | ||||
|         cd $FLAKE | ||||
|         hx $FLAKE | ||||
|         ''; | ||||
|         fish_hello_world = '' | ||||
|           echo "Hello World"; string repeat -N \n --count=(math (count (fish_prompt)) - 1); commandline -f repaint | ||||
|           ''; | ||||
| 
 | ||||
|         fish_user_key_bindings = '' | ||||
|           bind --preset -M insert \cf fish_flake_edit | ||||
|           bind --preset -M insert \ec fzf_cd_widget | ||||
|         ''; | ||||
|       }; | ||||
|       interactiveShellInit = | ||||
|         # Use vim bindings and cursors | ||||
|         '' | ||||
|           fish_vi_key_bindings | ||||
|           set fish_cursor_default     block      blink | ||||
|           set fish_cursor_insert      line       blink | ||||
|           set fish_cursor_replace_one underscore blink | ||||
|           set fish_cursor_visual      block | ||||
|         '' + | ||||
|         # Use terminal colors | ||||
|         '' | ||||
|           set -U fish_color_autosuggestion      brblack | ||||
|           set -U fish_color_cancel              -r | ||||
|           set -U fish_color_command             brgreen | ||||
|           set -U fish_color_comment             brmagenta | ||||
|           set -U fish_color_cwd                 green | ||||
|           set -U fish_color_cwd_root            red | ||||
|           set -U fish_color_end                 brmagenta | ||||
|           set -U fish_color_error               brred | ||||
|           set -U fish_color_escape              brcyan | ||||
|           set -U fish_color_history_current     --bold | ||||
|           set -U fish_color_host                normal | ||||
|           set -U fish_color_match               --background=brblue | ||||
|           set -U fish_color_normal              normal | ||||
|           set -U fish_color_operator            cyan | ||||
|           set -U fish_color_param               brblue | ||||
|           set -U fish_color_quote               yellow | ||||
|           set -U fish_color_redirection         bryellow | ||||
|           set -U fish_color_search_match        'bryellow' '--background=brblack' | ||||
|           set -U fish_color_selection           'white' '--bold' '--background=brblack' | ||||
|           set -U fish_color_status              red | ||||
|           set -U fish_color_user                brgreen | ||||
|           set -U fish_color_valid_path          --underline | ||||
|           set -U fish_pager_color_completion    normal | ||||
|           set -U fish_pager_color_description   yellow | ||||
|           set -U fish_pager_color_prefix        'white' '--bold' '--underline' | ||||
|           set -U fish_pager_color_progress      'brwhite' '--background=cyan' | ||||
|         ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|   | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue