home: delta: add 'jujutsu.enable'
This commit is contained in:
parent
497267a704
commit
4fdf589016
1 changed files with 25 additions and 0 deletions
|
|
@ -11,6 +11,10 @@ in
|
||||||
git = {
|
git = {
|
||||||
enable = my.mkDisableOption "git integration";
|
enable = my.mkDisableOption "git integration";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
jujutsu = {
|
||||||
|
enable = my.mkDisableOption "jujutsu integration";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
@ -45,5 +49,26 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# `jj log -p` does not use `delta`
|
||||||
|
# https://github.com/jj-vcs/jj/issues/4142
|
||||||
|
programs.jujutsu = lib.mkIf cfg.jujutsu.enable {
|
||||||
|
settings = {
|
||||||
|
merge-tools = {
|
||||||
|
delta = {
|
||||||
|
# Errors are signaled with exit codes greater or equal to 2
|
||||||
|
diff-expected-exit-codes = [ 0 1 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ui = {
|
||||||
|
# Delta expects a `git diff` input
|
||||||
|
diff-formatter = ":git";
|
||||||
|
|
||||||
|
# `finalPackage` automatically applied `--config` if necessary
|
||||||
|
pager = [ (lib.getExe config.programs.delta.finalPackage) ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue