From 8a968ab166ff295451ec74d9fb6e1dd0a175dc82 Mon Sep 17 00:00:00 2001 From: MLFlexer <75012728+MLFlexer@users.noreply.github.com> Date: Mon, 19 Aug 2024 18:44:05 +0200 Subject: [PATCH] add windows options to enable default wsl_domain --- home-manager/config/wezterm/wezterm.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/home-manager/config/wezterm/wezterm.lua b/home-manager/config/wezterm/wezterm.lua index 6dfc5db..7ff9122 100644 --- a/home-manager/config/wezterm/wezterm.lua +++ b/home-manager/config/wezterm/wezterm.lua @@ -2,6 +2,8 @@ local wezterm = require("wezterm") local mux = wezterm.mux wezterm.log_info("The config was reloaded for this window!") +local is_windows = wezterm.target_triple == "x86_64-pc-windows-msvc" + local function mergeTables(t1, t2) for key, value in pairs(t2) do t1[key] = value @@ -13,9 +15,6 @@ local function basename(s) end local config = { - -- uncomment if on windows with wsl - -- default_domain = 'WSL:Ubuntu' - default_workspace = "~", font = require("font").font, font_rules = require("font").font_rules, @@ -39,6 +38,17 @@ local config = { xcursor_theme = "Adwaita", -- fix cursor bug on gnome + wayland } +if is_windows then + config.wsl_domains = { + { + name = 'WSL:NixOS', + distribution = 'NixOS', + default_cwd = "/home/mlflexer", + }, + } + config.default_domain = 'WSL:NixOS' +end + local colors = require("colors") mergeTables(config, colors)