git: Don't use emacs as editor when it's not enabled

This commit is contained in:
Erwin Boskma 2024-09-20 14:17:07 +02:00
parent e67e610fda
commit 00765568bb
Signed by: erwin
SSH key fingerprint: SHA256:OCinH/khuGY1LA9RG8YLM8GNH6C1DDXBdy3SNE+I5Hw

View file

@ -8,6 +8,12 @@
with lib; with lib;
let let
cfg = config.eboskma.programs.git; cfg = config.eboskma.programs.git;
editor =
if config.eboskma.programs.emacs.enable then
"${config.eboskma.programs.emacs.package}/bin/emacsclient"
else
"${pkgs.neovim}/bin/nvim";
in in
{ {
options.eboskma.programs.git = { options.eboskma.programs.git = {
@ -116,7 +122,7 @@ in
defaultBranch = "main"; defaultBranch = "main";
}; };
core = { core = {
editor = "${config.eboskma.programs.emacs.package}/bin/emacsclient"; editor = "${editor}";
pager = "${pkgs.bat}/bin/bat"; pager = "${pkgs.bat}/bin/bat";
untrackedCache = true; untrackedCache = true;
# fsmonitor = # fsmonitor =