diff --git a/modules/wezterm/hm.nix b/modules/wezterm/hm.nix index 89deb24e..c4aa0f83 100644 --- a/modules/wezterm/hm.nix +++ b/modules/wezterm/hm.nix @@ -77,12 +77,12 @@ -- Generated by Stylix local wezterm = require("wezterm") wezterm.add_to_config_reload_watch_list(wezterm.config_dir) - local function stylix_wrapped_config() - ${config.programs.wezterm.extraConfig} + -- Allow working with both the current release and the nightly + local config = {} + if wezterm.config_builder then + config = wezterm.config_builder() end - local stylix_base_config = wezterm.config_builder() - local stylix_user_config = stylix_wrapped_config() - stylix_base_config = { + local stylix_base_config = { color_scheme = "stylix", font = wezterm.font_with_fallback { "${fonts.monospace.name}", @@ -136,10 +136,19 @@ command_palette_fg_color = "${base05}", command_palette_font_size = ${builtins.toString fonts.sizes.popups}, } - for key, value in pairs(stylix_user_config) do - stylix_base_config[key] = value + for key, value in pairs(stylix_base_config) do + config[key] = value end - return stylix_base_config + local function stylix_wrapped_config() + ${config.programs.wezterm.extraConfig} + end + local stylix_user_config = stylix_wrapped_config() + if stylix_user_config then + for key, value in pairs(stylix_user_config) do + config[key] = value + end + end + return config ''; }; }