mirror of
				https://github.com/materusPL/nixos-config
				synced 2025-11-03 22:10:28 +01:00 
			
		
		
		
	home-profile: move wezterm config to own file
This commit is contained in:
		
							parent
							
								
									369ed384a4
								
							
						
					
					
						commit
						a1eccd4d77
					
				@ -1,17 +1,12 @@
 | 
			
		||||
{ config, lib, materusArg, pkgs, ... }:
 | 
			
		||||
let
 | 
			
		||||
  cfg = config.materus.profile.wezterm;
 | 
			
		||||
  cfgText = ''
 | 
			
		||||
    config.hide_tab_bar_if_only_one_tab = true;
 | 
			
		||||
    config.enable_scroll_bar = true;
 | 
			
		||||
    config.font = wezterm.font 'Hack Nerd Font';
 | 
			
		||||
  '';
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
  options.materus.profile.wezterm.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable materus wezterm config";
 | 
			
		||||
  options.materus.profile.wezterm.enableHackFont = materusArg.pkgs.lib.mkBoolOpt true "Enable hack nerd font for wezterm";
 | 
			
		||||
  options.materus.profile.wezterm.config = lib.mkOption {
 | 
			
		||||
    default = cfgText;
 | 
			
		||||
  options.materus.profile.wezterm.extraConfig = lib.mkOption {
 | 
			
		||||
    default = "";
 | 
			
		||||
    description = "Config for wezterm";
 | 
			
		||||
    type = lib.types.string;
 | 
			
		||||
  };
 | 
			
		||||
@ -19,9 +14,11 @@ in
 | 
			
		||||
    programs.wezterm.enable = true;
 | 
			
		||||
    programs.wezterm.colorSchemes = { };
 | 
			
		||||
    programs.wezterm.extraConfig = ''
 | 
			
		||||
      local config = wezterm.config_builder();
 | 
			
		||||
 | 
			
		||||
      ${cfgText}
 | 
			
		||||
      package.path = package.path .. ";${materusArg.cfg.path}/extraFiles/config/wezterm/?.lua"
 | 
			
		||||
      require("wezterm_config");
 | 
			
		||||
      local config = materus_wezterm_config();
 | 
			
		||||
      ${cfg.extraConfig}
 | 
			
		||||
 | 
			
		||||
      return config;
 | 
			
		||||
    '';
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								extraFiles/config/wezterm/wezterm_config.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								extraFiles/config/wezterm/wezterm_config.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
local wezterm_config = {};
 | 
			
		||||
 | 
			
		||||
function materus_wezterm_config()
 | 
			
		||||
    local wezterm = require 'wezterm';
 | 
			
		||||
    local cfg = wezterm.config_builder();
 | 
			
		||||
    cfg.hide_tab_bar_if_only_one_tab = true;
 | 
			
		||||
    cfg.enable_scroll_bar = true;
 | 
			
		||||
    cfg.font = wezterm.font 'Hack Nerd Font';
 | 
			
		||||
    return cfg;
 | 
			
		||||
end
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user