Skip to content

Commit

Permalink
add windows options to enable default wsl_domain
Browse files Browse the repository at this point in the history
  • Loading branch information
MLFlexer committed Aug 19, 2024
1 parent e7e041f commit 8a968ab
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions home-manager/config/wezterm/wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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)

Expand Down

0 comments on commit 8a968ab

Please sign in to comment.