mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	use config.packages
This commit is contained in:
		
					parent
					
						
							
								114f6499e2
							
						
					
				
			
			
				commit
				
					
						a468f25500
					
				
			
		
					 1 changed files with 39 additions and 42 deletions
				
			
		|  | @ -1,47 +1,44 @@ | |||
| # Home Manager module | ||||
| {inputs, ...}: { | ||||
|   perSystem = { | ||||
|     system, | ||||
|     config, | ||||
|     pkgs, | ||||
|     lib ? pkgs.lib, | ||||
|     ... | ||||
|   }: | ||||
|     with lib; let | ||||
|       cfg = config.programs.neovim-flake; | ||||
|       set = self'.packages.maximal {mainConfig = cfg.settings;}; | ||||
|     in { | ||||
|       meta.maintainers = [maintainers.notashelf]; | ||||
| { | ||||
|   pkgs, | ||||
|   config, | ||||
|   lib ? pkgs.lib, | ||||
|   ... | ||||
| }: | ||||
| with lib; let | ||||
|   cfg = config.programs.neovim-flake; | ||||
|   set = config.packages.maximal {mainConfig = cfg.settings;}; | ||||
| in { | ||||
|   meta.maintainers = [maintainers.notashelf]; | ||||
| 
 | ||||
|       options.programs.neovim-flake = { | ||||
|         enable = mkEnableOption "A NeoVim IDE with a focus on configurability and extensibility."; | ||||
|   options.programs.neovim-flake = { | ||||
|     enable = mkEnableOption "A NeoVim IDE with a focus on configurability and extensibility."; | ||||
| 
 | ||||
|         settings = mkOption { | ||||
|           type = types.attrsOf types.anything; | ||||
|           default = {}; | ||||
|           example = literalExpression '' | ||||
|             { | ||||
|               vim.viAlias = false; | ||||
|               vim.vimAlias = true; | ||||
|               vim.lsp = { | ||||
|                 enable = true; | ||||
|                 formatOnSave = true; | ||||
|                 lightbulb.enable = true; | ||||
|                 lspsaga.enable = false; | ||||
|                 nvimCodeActionMenu.enable = true; | ||||
|                 trouble.enable = true; | ||||
|                 lspSignature.enable = true; | ||||
|                 rust.enable = false; | ||||
|                 nix = true; | ||||
|               }; | ||||
|             } | ||||
|           ''; | ||||
|           description = "Attribute set of neoflake preferences."; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       config = mkIf cfg.enable { | ||||
|         home.packages = [set.neovim]; | ||||
|       }; | ||||
|     settings = mkOption { | ||||
|       type = types.attrsOf types.anything; | ||||
|       default = {}; | ||||
|       example = literalExpression '' | ||||
|         { | ||||
|           vim.viAlias = false; | ||||
|           vim.vimAlias = true; | ||||
|           vim.lsp = { | ||||
|             enable = true; | ||||
|             formatOnSave = true; | ||||
|             lightbulb.enable = true; | ||||
|             lspsaga.enable = false; | ||||
|             nvimCodeActionMenu.enable = true; | ||||
|             trouble.enable = true; | ||||
|             lspSignature.enable = true; | ||||
|             rust.enable = false; | ||||
|             nix = true; | ||||
|           }; | ||||
|         } | ||||
|       ''; | ||||
|       description = "Attribute set of neoflake preferences."; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     home.packages = [set.neovim]; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 NotAShelf
				NotAShelf