dotfiles/home/apps/wezterm.nix

36 lines
969 B
Nix
Raw Normal View History

{
2023-02-10 07:46:37 +01:00
config,
flakePath,
2023-11-28 12:21:17 +01:00
lib,
pkgs,
2023-02-10 07:46:37 +01:00
...
}: let
mkSymlink = path: config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/wezterm/${path}";
2024-02-15 18:49:22 +01:00
srcs = pkgs.callPackage ../../_sources/generated.nix {};
inherit (pkgs.stdenv) isDarwin;
in {
2023-11-28 12:21:17 +01:00
# use the GUI version & config when we have a gui, else just get terminfo
config = lib.mkMerge [
(lib.mkIf (!config.isGraphical) {
home.packages = [pkgs.wezterm.terminfo];
})
2023-11-28 12:21:17 +01:00
(lib.mkIf config.isGraphical {
2024-01-03 14:57:18 +01:00
programs.wezterm = {
enable = true;
package = lib.mkIf isDarwin pkgs.nur.repos.nekowinston.wezterm-nightly;
2024-01-03 14:57:18 +01:00
};
2023-05-15 01:01:10 +02:00
2023-11-28 12:21:17 +01:00
xdg.configFile = {
"wezterm/wezterm.lua".source = mkSymlink "wezterm.lua";
"wezterm/config" = {
source = mkSymlink "config";
recursive = true;
};
2024-02-15 18:49:22 +01:00
"wezterm/bar".source = srcs.nekowinston-wezterm-bar.src;
"wezterm/catppuccin".source = srcs.catppuccin-wezterm.src;
2023-11-28 12:21:17 +01:00
};
})
];
}