Skip to content

Commit

Permalink
Install nightly only on nvidia systems
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Dec 12, 2024
1 parent e7b1a22 commit 6f51b87
Showing 1 changed file with 30 additions and 22 deletions.
52 changes: 30 additions & 22 deletions modules/home-manager/pc/terminal/wezterm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,40 @@
lib,
pkgs,
inputs,
osConfig,
...
}:
}@args:
{
options.terminals.wezterm.enable = lib.mkEnableOption "Enable wezterm terminal";

config = lib.mkIf config.terminals.wezterm.enable {
programs.wezterm = {
enable = true;
package = inputs.wezterm.packages.${pkgs.system}.default;
enableZshIntegration = config.programs.zsh.enable;
extraConfig = ''
local wezterm = require 'wezterm'
local config = {}
config.audible_bell = "Disabled"
config.enable_wayland = false
config.front_end = "WebGpu"
-- config.enable_wayland = true
-- config.front_end = "OpenGL"
config.hide_tab_bar_if_only_one_tab = true
-- config.window_decorations = 'TITLE | RESIZE'
config.window_decorations = 'RESIZE'
config.initial_rows = ${builtins.toString config.terminals.height}
config.initial_cols = ${builtins.toString config.terminals.width}
config.warn_about_missing_glyphs = false
return config
'';
};
programs.wezterm =
{
enable = true;
enableZshIntegration = config.programs.zsh.enable;
extraConfig = ''
local wezterm = require 'wezterm'
local config = {}
config.audible_bell = "Disabled"
config.enable_wayland = false
config.front_end = "WebGpu"
-- config.enable_wayland = true
-- config.front_end = "OpenGL"
config.hide_tab_bar_if_only_one_tab = true
-- config.window_decorations = 'TITLE | RESIZE'
config.window_decorations = 'RESIZE'
config.initial_rows = ${builtins.toString config.terminals.height}
config.initial_cols = ${builtins.toString config.terminals.width}
config.warn_about_missing_glyphs = false
return config
'';
}
// lib.optionalAttrs (args ? nixosConfig) {
package =
if osConfig.hosts.nvidia.enable then
inputs.wezterm.packages.${pkgs.system}.default
else
pkgs.wezterm;
};
};
}

0 comments on commit 6f51b87

Please sign in to comment.