nix-config/modules/home/firefox/tridactyl/default.nix
Bruno BELANYI 8b028ce19f home: terminal: rename 'default'
It doesn't make the *most* sense as an option name to use `program`.
2025-09-04 19:47:38 +01:00

26 lines
736 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.my.home.firefox.tridactyl;
term = config.my.home.terminal.default;
vimCommandLine = {
alacritty = ''-e "vim" "%f" "+normal!%lGzv%c|"'';
# Termite wants the whole command in a single argument...
termite = ''-e "vim %f '+normal!%lGzv%c|'"'';
};
in
{
config = lib.mkIf cfg.enable {
xdg.configFile."tridactyl/tridactylrc".source = pkgs.replaceVars ./tridactylrc {
editorcmd = lib.concatStringsSep " " [
# Use my configured terminal
term
# Make it easy to pick out with a window class name
"--class tridactyl_editor"
# Open vim with the cursor in the correct position
vimCommandLine.${term}
];
};
};
}