feat(home): Wezterm
This commit is contained in:
parent
8cad5a2600
commit
4f2b6749ff
3 changed files with 91 additions and 67 deletions
|
@ -5,6 +5,8 @@ in
|
|||
{
|
||||
home.keyboard.options = [ "apple:alupckeys" ];
|
||||
|
||||
targets.genericLinux = enabled;
|
||||
|
||||
${namespace} = {
|
||||
isDesktop = true;
|
||||
|
||||
|
@ -13,6 +15,7 @@ in
|
|||
gtk = enabled;
|
||||
qt = enabled;
|
||||
};
|
||||
# TODO: Seperate out into graphical/shell/tui?
|
||||
programs = {
|
||||
amfora = enabled;
|
||||
bat = enabled;
|
||||
|
@ -42,6 +45,7 @@ in
|
|||
starship = enabled;
|
||||
systemctl = enabled;
|
||||
tmux = enabled;
|
||||
wezterm = enabled;
|
||||
};
|
||||
xorg = {
|
||||
xsession = enabled;
|
||||
|
|
87
modules/home/programs/wezterm/default.nix
Normal file
87
modules/home/programs/wezterm/default.nix
Normal file
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.${namespace}) mkEnableModule;
|
||||
|
||||
cfg = config.${namespace}.programs.wezterm;
|
||||
inherit (config.${namespace}) theme;
|
||||
|
||||
isGenericLinux = config.targets.genericLinux.enable;
|
||||
in
|
||||
{
|
||||
options = mkEnableModule "programs.wezterm";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
|
||||
# Non-NixOS Linux systems don't have proper GPU integration, so we
|
||||
# unfortunately need to use the native package manager version.
|
||||
package = mkIf isGenericLinux pkgs.emptyDirectory;
|
||||
|
||||
# TODO: create `local config` & return it seperately, so other modules can
|
||||
# insert config in the middle
|
||||
extraConfig =
|
||||
let
|
||||
# TODO: Set this in marleyos.theme
|
||||
fonts = config.fonts.fontconfig.defaultFonts.monospace;
|
||||
in
|
||||
# lua
|
||||
''
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.enable_tab_bar = false
|
||||
|
||||
config.color_scheme = "${theme.colors.base}"
|
||||
|
||||
config.font = wezterm.font_with_fallback({
|
||||
{
|
||||
family = "Maple Mono NF",
|
||||
-- TODO: Set this in marleyos.theme
|
||||
harfbuzz_features = {
|
||||
"cv02",
|
||||
"ss01",
|
||||
"ss02",
|
||||
"ss03",
|
||||
"ss04",
|
||||
"ss05",
|
||||
}
|
||||
},
|
||||
${toString (map (font: "{ family = \"${font}\" },") fonts)}
|
||||
{ family = "FairiesevkaTerm Nerd Font Mono" },
|
||||
{
|
||||
family = "FiraCode Nerd Font",
|
||||
harfbuzz_features = {
|
||||
"cv02",
|
||||
"cv06",
|
||||
"ss01",
|
||||
"cv14",
|
||||
"onum",
|
||||
"ss04",
|
||||
"cv18",
|
||||
"cv31",
|
||||
"cv30",
|
||||
"cv25",
|
||||
"cv26",
|
||||
"cv32",
|
||||
"ss06",
|
||||
"ss07",
|
||||
},
|
||||
},
|
||||
{ family = "Apple Color Emoji" },
|
||||
})
|
||||
|
||||
-- TODO: on mairley this should be set to 14.0
|
||||
config.font_size = 11.0
|
||||
|
||||
return config
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
|
||||
# Non-NixOS Linux systems don't have proper GPU integration, so we
|
||||
# unfortunately need to use the native package manager version.
|
||||
package = pkgs.emptyDirectory;
|
||||
|
||||
# TODO: create `local config` & return it seperately, so other modules can
|
||||
# insert config in the middle
|
||||
extraConfig =
|
||||
let
|
||||
fonts = config.fonts.fontconfig.defaultFonts.monospace;
|
||||
in
|
||||
# lua
|
||||
''
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.enable_tab_bar = false
|
||||
|
||||
-- TODO: auto-set this depending on color scheme
|
||||
config.color_scheme = "rose-pine"
|
||||
|
||||
config.font = wezterm.font_with_fallback({
|
||||
{
|
||||
family = "Maple Mono NF",
|
||||
harfbuzz_features = {
|
||||
"cv02",
|
||||
"ss01",
|
||||
"ss02",
|
||||
"ss03",
|
||||
"ss04",
|
||||
"ss05",
|
||||
}
|
||||
},
|
||||
${toString (map (font: "{ family = \"${font}\" },") fonts)}
|
||||
{ family = "FairiesevkaTerm Nerd Font Mono" },
|
||||
{
|
||||
family = "FiraCode Nerd Font",
|
||||
harfbuzz_features = {
|
||||
"cv02",
|
||||
"cv06",
|
||||
"ss01",
|
||||
"cv14",
|
||||
"onum",
|
||||
"ss04",
|
||||
"cv18",
|
||||
"cv31",
|
||||
"cv30",
|
||||
"cv25",
|
||||
"cv26",
|
||||
"cv32",
|
||||
"ss06",
|
||||
"ss07",
|
||||
},
|
||||
},
|
||||
{ family = "Apple Color Emoji" },
|
||||
})
|
||||
|
||||
-- TODO: on mairley this should be set to 14.0
|
||||
config.font_size = 11.0
|
||||
|
||||
return config
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue