2024-11-13 17:22:55 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.eboskma.programs.jujutsu;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.eboskma.programs.jujutsu = {
|
|
|
|
enable = mkEnableOption "jujutsu";
|
|
|
|
name = mkOption {
|
|
|
|
description = "your name";
|
|
|
|
type = types.nonEmptyStr;
|
|
|
|
};
|
|
|
|
|
|
|
|
email = mkOption {
|
|
|
|
description = "your e-mail address";
|
|
|
|
type = types.nonEmptyStr;
|
|
|
|
};
|
|
|
|
|
|
|
|
signingKey = mkOption {
|
|
|
|
description = "your signing key";
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
default = null;
|
|
|
|
};
|
|
|
|
|
|
|
|
signingBackend = mkOption {
|
|
|
|
description = "the type of signing key";
|
|
|
|
type = types.enum [
|
|
|
|
"gpg"
|
|
|
|
"ssh"
|
|
|
|
];
|
|
|
|
default = "openpgp";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.jujutsu = {
|
|
|
|
enable = true;
|
2024-11-14 09:40:41 +01:00
|
|
|
ediff = false;
|
|
|
|
|
2024-11-13 17:22:55 +01:00
|
|
|
settings = {
|
|
|
|
user = {
|
|
|
|
name = cfg.name;
|
|
|
|
email = cfg.email;
|
|
|
|
};
|
|
|
|
|
|
|
|
core = {
|
|
|
|
fsmonitor = "watchman";
|
|
|
|
watchman.register_snapshot_triggers = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
ui = {
|
|
|
|
diff = {
|
|
|
|
tool = "difftastic";
|
|
|
|
};
|
|
|
|
pager = lib.getExe pkgs.bat;
|
|
|
|
};
|
|
|
|
|
2024-11-14 09:40:41 +01:00
|
|
|
merge-tools = {
|
|
|
|
difftastic = {
|
|
|
|
program = lib.getExe pkgs.difftastic;
|
|
|
|
diff-args = [
|
|
|
|
"--color=always"
|
|
|
|
"--background=dark"
|
|
|
|
"--display=side-by-side-show-both"
|
|
|
|
"$left"
|
|
|
|
"$right"
|
|
|
|
];
|
2024-11-13 17:22:55 +01:00
|
|
|
|
2024-11-14 09:40:41 +01:00
|
|
|
};
|
2024-11-13 17:22:55 +01:00
|
|
|
};
|
|
|
|
signing = {
|
|
|
|
sign-all = true;
|
|
|
|
backend = cfg.signingBackend;
|
|
|
|
key = cfg.signingKey;
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
home.packages = with pkgs; [ watchman ];
|
|
|
|
};
|
|
|
|
}
|