Hi there, I am configuring wezterm with home-manager…
If I run the following, my switch
works.
{ pkgs, ... }:
{
programs.wezterm = {
enable = true;
};
}
But when I add in my extraConfig
I end up with an error.
{ pkgs, ... }:
{
programs.wezterm = {
enable = true;
extraConfig = ''
local wezterm = require 'wezterm'
return {
font = wezterm.font 'Berkeley Mono Variable',
font_size = 18.0,
cursor_blink_rate = 800,
color_scheme = "Dracula (Official)",
tab_bar_at_bottom = true,
use_fancy_tab_bar = false,
window_decorations = "RESIZE"
}
''
};
}
Error:
error: syntax error, unexpected '}', expecting ';'
at /nix/store/czvbcqkwmjzmyqzi4dfwlxhzdx97yz22-source/configs:22:3:
21|
22| };
| ^
23| }
Now I suspect it is the {}
in the lua code. But I thought we would not have to escape in a ''
multiline string.
Thanks for your input.
EDIT - I am a ding dong. I forgot the ;
after the terminating ''
in the multiline string.
Correct code
{ pkgs, ... }:
{
programs.wezterm = {
enable = true;
extraConfig = ''
local wezterm = require 'wezterm'
return {
font = wezterm.font 'Berkeley Mono Variable',
font_size = 18.0,
cursor_blink_rate = 800,
color_scheme = "Dracula (Official)",
tab_bar_at_bottom = true,
use_fancy_tab_bar = false,
window_decorations = "RESIZE"
}
''; # <-------- this was missing
};
}