repo: fix formatting

This commit is contained in:
Anthony Rodriguez 2024-09-24 15:09:36 +02:00
parent 5ca57843d6
commit 80452cb292
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
32 changed files with 345 additions and 220 deletions

View file

@ -1,10 +1,9 @@
_: _: {
{
imports = [ imports = [
./core.nix ./core.nix
./automount.nix ./automount.nix
./mime.nix ./mime.nix
./shell ./shell
./programs ./programs
]; ];
} }

View file

@ -1,17 +1,16 @@
{ ... }: { ... }:
{ {
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"default-web-browser" = [ "firefox.desktop" ]; "default-web-browser" = [ "firefox.desktop" ];
"text/html" = [ "firefox.desktop" ]; "text/html" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ]; "x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ]; "x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ]; "x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ]; "x-scheme-handler/unknown" = [ "firefox.desktop" ];
"application/pdf" = [ "org.gnome.Evince.desktop" ]; "application/pdf" = [ "org.gnome.Evince.desktop" ];
"audio/wav" = [ "rhythmbox" ]; "audio/wav" = [ "rhythmbox" ];
}; };
}; };
} }

View file

@ -1,5 +1,4 @@
_: _: {
{
programs.chromium.enable = true; programs.chromium.enable = true;
programs.firefox.enable = true; programs.firefox.enable = true;
} }

View file

@ -1,9 +1,9 @@
{ ... }: { ... }:
{ {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Anthony Rodriguez"; userName = "Anthony Rodriguez";
userEmail = "anthony@nezia.dev"; userEmail = "anthony@nezia.dev";
signing = { signing = {
signByDefault = true; signByDefault = true;

View file

@ -3,5 +3,13 @@
{ {
programs.fzf.enable = true; programs.fzf.enable = true;
programs.fastfetch.enable = true; programs.fastfetch.enable = true;
home.packages = with pkgs; [ imhex obsidian proton-pass spotify vesktop wl-clipboard stremio ]; home.packages = with pkgs; [
imhex
obsidian
proton-pass
spotify
vesktop
wl-clipboard
stremio
];
} }

View file

@ -7,7 +7,7 @@
escapeTime = 10; escapeTime = 10;
clock24 = true; clock24 = true;
keyMode = "vi"; keyMode = "vi";
mouse = true; mouse = true;
baseIndex = 1; baseIndex = 1;
extraConfig = '' extraConfig = ''
set-option -a terminal-features "''${TERM}:RGB" set-option -a terminal-features "''${TERM}:RGB"

View file

@ -1,10 +1,9 @@
_: _: {
{ imports = [
imports = [ ./fish.nix
./fish.nix
./starship.nix ./starship.nix
./zoxide.nix ./zoxide.nix
./direnv.nix ./direnv.nix
./zellij.nix ./zellij.nix
]; ];
} }

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, ... }:
let let
catppuccin-fish = pkgs.fetchFromGitHub { catppuccin-fish = pkgs.fetchFromGitHub {
@ -8,7 +8,7 @@ let
hash = "sha256-shQxlyoauXJACoZWtRUbRMxmm10R8vOigXwjxBhG8ng="; hash = "sha256-shQxlyoauXJACoZWtRUbRMxmm10R8vOigXwjxBhG8ng=";
}; };
in in
{ {
programs.fish = { programs.fish = {
enable = true; enable = true;
interactiveShellInit = '' interactiveShellInit = ''
@ -16,9 +16,15 @@ in
fish_vi_key_bindings # Enable Vi mode fish_vi_key_bindings # Enable Vi mode
fish_config theme choose "Catppuccin Frappe" fish_config theme choose "Catppuccin Frappe"
''; '';
shellAbbrs = { cd = "z"; ngc = "sudo nix-collect-garbage -d"; }; shellAbbrs = {
plugins = [ cd = "z";
{ name = "fzf"; src = pkgs.fishPlugins.fzf.src; } ngc = "sudo nix-collect-garbage -d";
};
plugins = [
{
name = "fzf";
src = pkgs.fishPlugins.fzf.src;
}
]; ];
}; };
@ -35,4 +41,3 @@ in
xdg.configFile."fish/themes/Catppuccin Frappe.theme".source = "${catppuccin-fish}/themes/Catppuccin Frappe.theme"; xdg.configFile."fish/themes/Catppuccin Frappe.theme".source = "${catppuccin-fish}/themes/Catppuccin Frappe.theme";
} }

View file

@ -1,4 +1,5 @@
{ ... }: { { ... }:
{
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
enableBashIntegration = false; enableBashIntegration = false;

View file

@ -1,5 +1,4 @@
_: _: {
{
imports = [ imports = [
../common ../common
./gaming ./gaming

View file

@ -2,8 +2,8 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
protonup-qt protonup-qt
bottles bottles
lutris lutris
path-of-building path-of-building

View file

@ -1,5 +1,4 @@
_: _: {
{
imports = [ imports = [
../common ../common
]; ];

View file

@ -1,8 +1,7 @@
_: _: {
{
imports = [ imports = [
./system ./system
./syncthing ./syncthing
./sops.nix ./sops.nix
]; ];

View file

@ -1,16 +1,22 @@
{ config, username, hostname, ... }: {
config,
username,
hostname,
...
}:
let let
homeDir = "/home/${username}"; homeDir = "/home/${username}";
devices = import ./devices.nix; devices = import ./devices.nix;
otherDevices = builtins.removeAttrs devices [hostname]; otherDevices = builtins.removeAttrs devices [ hostname ];
in { in
{
services = { services = {
syncthing = { syncthing = {
enable = true; enable = true;
user = "${username}"; user = "${username}";
dataDir = "${homeDir}/Documents"; dataDir = "${homeDir}/Documents";
configDir = "${homeDir}/.config/syncthing"; # Folder for Syncthing's settings and keys configDir = "${homeDir}/.config/syncthing"; # Folder for Syncthing's settings and keys
key = "${config.sops.secrets."syncthing/${hostname}/key".path}"; key = "${config.sops.secrets."syncthing/${hostname}/key".path}";
cert = "${config.sops.secrets."syncthing/${hostname}/cert".path}"; cert = "${config.sops.secrets."syncthing/${hostname}/cert".path}";
settings = { settings = {

View file

@ -1,5 +1,9 @@
# TODO: add to sops directly instead of relying on another nix file # TODO: add to sops directly instead of relying on another nix file
{ {
"vamos" = { id = "UO6JWVU-MTLZGVQ-Z3QAFYH-6PW2QR6-SBOVM6P-S6JXR2S-A7VYAU2-RLRXEQY"; }; "vamos" = {
"solaire" = { id = "R5RK7CH-DRFXW4E-ARTPMHN-UMWYQ4O-QK7F3TA-EHVLDK4-DQ6CBT4-XRRWQQM"; }; id = "UO6JWVU-MTLZGVQ-Z3QAFYH-6PW2QR6-SBOVM6P-S6JXR2S-A7VYAU2-RLRXEQY";
};
"solaire" = {
id = "R5RK7CH-DRFXW4E-ARTPMHN-UMWYQ4O-QK7F3TA-EHVLDK4-DQ6CBT4-XRRWQQM";
};
} }

View file

@ -14,8 +14,8 @@
plymouth = { plymouth = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
[Daemon] [Daemon]
DeviceScale=2 DeviceScale=2
''; '';
}; };
consoleLogLevel = 0; consoleLogLevel = 0;

View file

@ -1,7 +1,7 @@
{ hostname, ... }: { hostname, ... }:
{ {
networking.hostName = hostname; networking.hostName = hostname;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
services.xserver.xkb = { services.xserver.xkb = {
@ -12,7 +12,10 @@
users.users.nezia = { users.users.nezia = {
isNormalUser = true; isNormalUser = true;
description = "Anthony Rodriguez"; description = "Anthony Rodriguez";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [
"networkmanager"
"wheel"
];
}; };
# automount # automount
@ -23,7 +26,10 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
system.stateVersion = "24.05"; system.stateVersion = "24.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
} }

View file

@ -1,10 +1,9 @@
_: _: {
{
imports = [ imports = [
./core.nix ./core.nix
./boot.nix ./boot.nix
./locale.nix ./locale.nix
./packages.nix ./packages.nix
./printing.nix ./printing.nix
./misc.nix ./misc.nix

View file

@ -2,7 +2,7 @@
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim vim
git git
wget wget
curl curl

View file

@ -10,14 +10,20 @@
openFirewall = true; openFirewall = true;
}; };
services.printing.drivers = [ pkgs.gutenprint pkgs.hplip ]; services.printing.drivers = [
pkgs.gutenprint
pkgs.hplip
];
hardware.sane.enable = true; # enables support for SANE scanners hardware.sane.enable = true; # enables support for SANE scanners
hardware.sane.extraBackends = [ hardware.sane.extraBackends = [
pkgs.sane-airscan # generic pkgs.sane-airscan # generic
pkgs.hplip # HP pkgs.hplip # HP
pkgs.epkowa # Epson pkgs.epkowa # Epson
pkgs.utsushi # other printers pkgs.utsushi # other printers
];
services.udev.packages = [
pkgs.sane-airscan
pkgs.utsushi
]; ];
services.udev.packages = [ pkgs.sane-airscan pkgs.utsushi ];
} }

View file

@ -1,8 +1,8 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
hardware.uni-sync = { hardware.uni-sync = {
@ -38,7 +38,7 @@
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.uni-sync}/bin/uni-sync"; ExecStart = "${pkgs.uni-sync}/bin/uni-sync";
}; };
wantedBy = ["multi-user.target"]; wantedBy = [ "multi-user.target" ];
}; };
modules.nvidia.enable = true; modules.nvidia.enable = true;
modules.gaming.enable = true; modules.gaming.enable = true;
@ -46,4 +46,3 @@
stylix.image = ../../wallpapers/lucy-edgerunners-wallpaper.jpg; stylix.image = ../../wallpapers/lucy-edgerunners-wallpaper.jpg;
} }

View file

@ -1,28 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-label/NIXROOT"; device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-label/NIXBOOT"; device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
}; "fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ]; swapDevices = [ ];

View file

@ -1,27 +1,25 @@
{ inputs, ... }: { inputs, ... }:
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.framework-13-7040-amd inputs.nixos-hardware.nixosModules.framework-13-7040-amd
]; ];
services.fprintd.enable = true; services.fprintd.enable = true;
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
services.keyd = {
services.keyd = { enable = true;
enable = true; keyboards = {
keyboards = { default = {
default = { ids = [ "*" ];
ids = [ "*" ]; settings = {
settings = { main = {
main = { capslock = "overload(control, esc)";
capslock = "overload(control, esc)"; };
}; };
}; };
}; };
}; };
}; modules.neovim.enable = true;
config.modules.neovim.enable = true;
} }

View file

@ -1,29 +1,50 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [
boot.initrd.kernelModules = [ "amdgpu" "dm-snapshot" ]; "nvme"
boot.kernelModules = [ "kvm-amd" "cryptd" ]; "xhci_pci"
"thunderbolt"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [
"amdgpu"
"dm-snapshot"
];
boot.kernelModules = [
"kvm-amd"
"cryptd"
];
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/39d0e0c6-ea32-4ee4-ac76-b28fbff687f8"; boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/39d0e0c6-ea32-4ee4-ac76-b28fbff687f8";
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/4ef04567-9633-45b9-addc-55c3020f45b7"; device = "/dev/disk/by-uuid/4ef04567-9633-45b9-addc-55c3020f45b7";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/C519-2E55"; device = "/dev/disk/by-uuid/C519-2E55";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
}; "fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ]; swapDevices = [ ];

View file

@ -1,9 +1,8 @@
_: _: {
{ imports = [
imports = [
./docker.nix ./docker.nix
./pipewire.nix ./pipewire.nix
./nvidia.nix ./nvidia.nix
./gnome.nix ./gnome.nix
./gaming.nix ./gaming.nix
./wezterm.nix ./wezterm.nix

View file

@ -1,8 +1,13 @@
{ config, lib, username, ... }: {
let config,
lib,
username,
...
}:
let
cfg = config.modules.docker; cfg = config.modules.docker;
in in
{ {
options.modules.docker.enable = lib.mkEnableOption "docker module"; options.modules.docker.enable = lib.mkEnableOption "docker module";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
virtualisation.docker = { virtualisation.docker = {

View file

@ -1,8 +1,13 @@
{ lib, config, pkgs, ... }: {
let lib,
config,
pkgs,
...
}:
let
cfg = config.modules.gaming; cfg = config.modules.gaming;
in in
{ {
options = { options = {
modules.gaming = { modules.gaming = {
enable = lib.mkEnableOption "Enable the gaming module"; enable = lib.mkEnableOption "Enable the gaming module";
@ -30,4 +35,3 @@ in
services.udev.packages = [ pkgs.via ]; services.udev.packages = [ pkgs.via ];
}; };
} }

View file

@ -1,9 +1,15 @@
{ config, lib, pkgs, username, ... }: {
let config,
lib,
pkgs,
username,
...
}:
let
cfg = config.modules.gnome; cfg = config.modules.gnome;
stylixEnabled = config.modules.stylix.enable or false; stylixEnabled = config.modules.stylix.enable or false;
in in
{ {
options = { options = {
modules.gnome = { modules.gnome = {
enable = lib.mkEnableOption "Enable Gnome"; enable = lib.mkEnableOption "Enable Gnome";
@ -17,17 +23,36 @@ in
enable = true; enable = true;
extraGSettingsOverridePackages = [ pkgs.mutter ]; extraGSettingsOverridePackages = [ pkgs.mutter ];
extraGSettingsOverrides = '' extraGSettingsOverrides = ''
[org.gnome.mutter] [org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer'] experimental-features=['scale-monitor-framebuffer']
''; '';
}; };
}; };
environment.gnome.excludePackages = environment.gnome.excludePackages = (
(with pkgs; [ gnome-console gnome-photos gnome-tour gnome-software iagno hitori atomix gnome-contacts gnome-initial-setup gnome-music gedit cheese tali epiphany geary yelp ]); with pkgs;
[
gnome-console
gnome-photos
gnome-tour
gnome-software
iagno
hitori
atomix
gnome-contacts
gnome-initial-setup
gnome-music
gedit
cheese
tali
epiphany
geary
yelp
]
);
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnome-tweaks gnome-tweaks
gnome-power-manager gnome-power-manager
rhythmbox rhythmbox
]; ];
@ -67,12 +92,31 @@ in
enable-hot-corners = false; enable-hot-corners = false;
}; };
"org/gnome/desktop/search-providers" = { "org/gnome/desktop/search-providers" = {
disabled=["org.gnome.Terminal.desktop" "org.gnome.Software.desktop" "org.gnome.seahorse.Application.desktop" "org.gnome.clocks.desktop" "org.gnome.Characters.desktop" "org.gnome.Calendar.desktop" "org.gnome.Calculator.desktop"]; disabled = [
"org.gnome.Terminal.desktop"
"org.gnome.Software.desktop"
"org.gnome.seahorse.Application.desktop"
"org.gnome.clocks.desktop"
"org.gnome.Characters.desktop"
"org.gnome.Calendar.desktop"
"org.gnome.Calculator.desktop"
];
enabled = ["org.gnome.Nautilus.desktop" "org.gnome.Settings.desktop"]; enabled = [
"org.gnome.Nautilus.desktop"
"org.gnome.Settings.desktop"
];
}; };
"org/freedesktop/tracker/mine/files" = { "org/freedesktop/tracker/mine/files" = {
index-recursive-directories=["&DESKTOP" "&DOCUMENTS" "&MUSIC" "&PICTURES" "&VIDEOS" "/home/${username}/Notes" "/home/${username}/Projects"]; index-recursive-directories = [
"&DESKTOP"
"&DOCUMENTS"
"&MUSIC"
"&PICTURES"
"&VIDEOS"
"/home/${username}/Notes"
"/home/${username}/Projects"
];
}; };
}; };

View file

@ -1,15 +1,15 @@
{ config, lib, ... }: { config, lib, ... }:
let let
cfg = config.modules.nvidia; cfg = config.modules.nvidia;
in in
{ {
options = { options = {
modules.nvidia = { modules.nvidia = {
enable = lib.mkEnableOption "Enable the Nvidia module"; enable = lib.mkEnableOption "Enable the Nvidia module";
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = { hardware.nvidia = {
# Modesetting is required. # Modesetting is required.

View file

@ -1,9 +1,9 @@
{ config, lib, ... }: { config, lib, ... }:
let let
cfg = config.modules.pipewire; cfg = config.modules.pipewire;
in in
{ {
options.modules.pipewire.enable = lib.mkEnableOption "pipewire module"; options.modules.pipewire.enable = lib.mkEnableOption "pipewire module";
options.modules.pipewire.latencyFix.enable = lib.mkEnableOption "enable latency fixes"; options.modules.pipewire.latencyFix.enable = lib.mkEnableOption "enable latency fixes";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -21,10 +21,10 @@ in
services.pipewire.extraConfig.pipewire."92-low-latency" = lib.mkIf cfg.latencyFix.enable { services.pipewire.extraConfig.pipewire."92-low-latency" = lib.mkIf cfg.latencyFix.enable {
"context.properties" = { "context.properties" = {
"default.clock.rate" = 48000; "default.clock.rate" = 48000;
"default.clock.allowed-rates" = [ 48000 ]; "default.clock.allowed-rates" = [ 48000 ];
"default.clock.quantum" = 2048; "default.clock.quantum" = 2048;
"default.clock.min-quantum" = 1024; "default.clock.min-quantum" = 1024;
}; };
}; };

View file

@ -1,8 +1,13 @@
{ config, lib, pkgs, ... }: {
let config,
lib,
pkgs,
...
}:
let
cfg = config.modules.stylix; cfg = config.modules.stylix;
in in
{ {
options = { options = {
modules.stylix = { modules.stylix = {
enable = lib.mkEnableOption "Enable the stylix module"; enable = lib.mkEnableOption "Enable the stylix module";

View file

@ -1,6 +1,12 @@
{ config, lib, inputs, username, ... }: {
let config,
cfg = config.modules.wezterm; lib,
inputs,
username,
...
}:
let
cfg = config.modules.wezterm;
in in
{ {
options = { options = {
@ -14,69 +20,69 @@ in
enable = true; enable = true;
# package = inputs.wezterm.packages.${pkgs.system}.default; # package = inputs.wezterm.packages.${pkgs.system}.default;
extraConfig = '' extraConfig = ''
local w = require('wezterm') local w = require('wezterm')
local function is_vim(pane) local function is_vim(pane)
return pane:get_user_vars().IS_NVIM == 'true' return pane:get_user_vars().IS_NVIM == 'true'
end
local direction_keys = {
h = 'Left',
j = 'Down',
k = 'Up',
l = 'Right',
}
local function split_nav(resize_or_move, key)
return {
key = key,
mods = resize_or_move == 'resize' and 'META' or 'CTRL',
action = w.action_callback(function(win, pane)
if is_vim(pane) then
win:perform_action({
SendKey = { key = key, mods = resize_or_move == 'resize' and 'META' or 'CTRL' },
}, pane)
else
if resize_or_move == 'resize' then
win:perform_action({ AdjustPaneSize = { direction_keys[key], 3 } }, pane)
else
win:perform_action({ ActivatePaneDirection = direction_keys[key] }, pane)
end
end
end),
}
end end
local direction_keys = { return {
h = 'Left', enable_wayland = false,
j = 'Down', front_end = "WebGpu",
k = 'Up', hide_tab_bar_if_only_one_tab = true,
l = 'Right', show_new_tab_button_in_tab_bar = false,
} harfbuzz_features = { "ss01", "ss03" },
local function split_nav(resize_or_move, key) leader = { key = " ", mods = "CTRL", timeout_milliseconds = 1000 },
return {
key = key,
mods = resize_or_move == 'resize' and 'META' or 'CTRL',
action = w.action_callback(function(win, pane)
if is_vim(pane) then
win:perform_action({
SendKey = { key = key, mods = resize_or_move == 'resize' and 'META' or 'CTRL' },
}, pane)
else
if resize_or_move == 'resize' then
win:perform_action({ AdjustPaneSize = { direction_keys[key], 3 } }, pane)
else
win:perform_action({ ActivatePaneDirection = direction_keys[key] }, pane)
end
end
end),
}
end
return { keys = {
enable_wayland = false, {
front_end = "WebGpu", mods = "LEADER",
hide_tab_bar_if_only_one_tab = true, key = "-",
show_new_tab_button_in_tab_bar = false, action = wezterm.action.SplitVertical { domain = "CurrentPaneDomain" }
harfbuzz_features = { "ss01", "ss03" }, },
{
leader = { key = " ", mods = "CTRL", timeout_milliseconds = 1000 }, mods = "LEADER",
key = "=",
keys = { action = wezterm.action.SplitHorizontal { domain = "CurrentPaneDomain" }
{ },
mods = "LEADER", split_nav('move', 'h'),
key = "-", split_nav('move', 'j'),
action = wezterm.action.SplitVertical { domain = "CurrentPaneDomain" } split_nav('move', 'k'),
split_nav('move', 'l'),
split_nav('resize', 'h'),
split_nav('resize', 'j'),
split_nav('resize', 'k'),
split_nav('resize', 'l'),
}, },
{ }
mods = "LEADER",
key = "=",
action = wezterm.action.SplitHorizontal { domain = "CurrentPaneDomain" }
},
split_nav('move', 'h'),
split_nav('move', 'j'),
split_nav('move', 'k'),
split_nav('move', 'l'),
split_nav('resize', 'h'),
split_nav('resize', 'j'),
split_nav('resize', 'k'),
split_nav('resize', 'l'),
},
}
''; '';
}; };
}; };