2024-12-22 22:41:02 +00:00
|
|
|
{ pkgs, ... }:
|
2022-12-19 21:02:48 +00:00
|
|
|
|
2023-09-07 13:13:43 +00:00
|
|
|
let
|
|
|
|
wezterm-pkg = pkgs.wezterm;
|
|
|
|
in
|
2022-12-19 21:02:48 +00:00
|
|
|
{
|
|
|
|
programs.wezterm = {
|
|
|
|
enable = true;
|
2023-09-07 13:13:43 +00:00
|
|
|
package = wezterm-pkg;
|
2023-02-15 23:33:50 +00:00
|
|
|
|
2023-10-01 20:56:08 +00:00
|
|
|
extraConfig = /* lua */ ''
|
2022-12-20 16:46:51 +00:00
|
|
|
_G.shells = {
|
2023-09-09 17:54:02 +00:00
|
|
|
bash = '${pkgs.bash.outPath}/bin/bash',
|
2024-12-22 22:41:02 +00:00
|
|
|
zsh = '${pkgs.zsh.outPath}/bin/zsh',
|
2022-12-20 16:46:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_G.programs = {
|
|
|
|
btop = '${pkgs.btop.outPath}/bin/btop',
|
|
|
|
};
|
2022-12-19 21:02:48 +00:00
|
|
|
|
|
|
|
local cfg = require('config');
|
|
|
|
return cfg
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
xdg.configFile."wezterm" = {
|
|
|
|
source = pkgs.runCommand "wezterm-fennel-files"
|
|
|
|
{
|
2023-11-16 23:12:19 +00:00
|
|
|
nativeBuildInputs = with pkgs; [ lua53Packages.fennel ];
|
2022-12-19 21:02:48 +00:00
|
|
|
} ''
|
|
|
|
mkdir -p $out
|
|
|
|
|
|
|
|
config_store_path="${../config/wezterm}"
|
|
|
|
fennel="fennel --use-bit-lib --compile"
|
|
|
|
|
|
|
|
echo "Using fennel command: $fennel"
|
|
|
|
|
|
|
|
# Change PWD to config directory
|
|
|
|
cd "$config_store_path"
|
|
|
|
|
2023-10-02 09:38:32 +00:00
|
|
|
# Config
|
|
|
|
echo "Compiling config.fnl ..."
|
2022-12-19 21:02:48 +00:00
|
|
|
$fennel "$config_store_path/config.fnl" > "$out/config.lua"
|
|
|
|
'';
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
}
|