From bda31cf1a74d73b019dd7948aa99c0802d592b45 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 2 Nov 2024 15:53:31 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(wezterm):=20Add=20Wezterm=20co?= =?UTF-8?q?nfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This config does require the user to format their configuration in a specific way: ```lua local config = wezterm.config_builder() -- config here... return config ``` Since this is the format that the official documentation uses in examples, most users probably follow suit. But worth pointing out regardless. --- modules/home-manager/wezterm.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 modules/home-manager/wezterm.nix diff --git a/modules/home-manager/wezterm.nix b/modules/home-manager/wezterm.nix new file mode 100644 index 0000000..6084571 --- /dev/null +++ b/modules/home-manager/wezterm.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: +let + cfg = config.programs.wezterm.rose-pine; + enable = cfg.enable && config.programs.wezterm.enable; +in +{ + options.programs.wezterm.rose-pine = lib.rp.mkRosePineOpt { name = "wezterm"; }; + + config.programs.wezterm.extraConfig = lib.mkIf enable '' + local theme = wezterm.plugin.require('https://github.com/neapsix/wezterm').${cfg.flavor} + + config.colors = theme.colors() + config.window_frame = theme.window_frame() + ''; +}