home-profile: init wezterm

This commit is contained in:
Mateusz Słodkowicz 2024-03-31 21:11:40 +02:00
parent e046b8878e
commit 8b1d9ff963
Signed by: materus
SSH Key Fingerprint: SHA256:rzVduzTiiszuYfLPYD0SDZV+g8lxhpcRgpbOZA1X0Uo
4 changed files with 43 additions and 3 deletions

View File

@ -16,15 +16,15 @@ let
pkgs.noto-fonts-cjk-serif
pkgs.wqy_zenhei
pkgs.corefonts
(pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
pkgs.hack-font
(pkgs.nerdfonts.override { fonts = [ "Hack" ]; })
] ++ defaultFonts;
moreFonts = [
pkgs.ubuntu_font_family
pkgs.monocraft
pkgs.hack-font
(pkgs.nerdfonts.override { fonts = [ "DroidSansMono" "Meslo" "ProFont" ]; })
(pkgs.nerdfonts.override { fonts = [ "DroidSansMono" "Meslo" "ProFont" "FiraCode"]; })
];
in
{

View File

@ -11,6 +11,7 @@ in
./shell
./editor
./terminal
];
options.materus.profile.enableDesktop = materusArg.pkgs.lib.mkBoolOpt false "Enable settings for desktop";

View File

@ -0,0 +1,8 @@
{...}:
{
imports = [
./wezterm.nix
];
}

View File

@ -0,0 +1,31 @@
{ 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;
description = "Config for wezterm";
type = lib.types.string;
};
config = lib.mkIf cfg.enable {
programs.wezterm.enable = true;
programs.wezterm.colorSchemes = { };
programs.wezterm.extraConfig = ''
local config = wezterm.config_builder();
${cfgText}
return config;
'';
home.packages = lib.mkIf cfg.enableHackFont [ (pkgs.nerdfonts.override { fonts = [ "Hack" ]; }) ];
};
}