jujutsu: init module

This commit is contained in:
Erwin Boskma 2024-11-13 17:22:55 +01:00
parent 810ba3d165
commit ad8fc76af1
Signed by: erwin
SSH key fingerprint: SHA256:OCinH/khuGY1LA9RG8YLM8GNH6C1DDXBdy3SNE+I5Hw
2 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,84 @@
{
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;
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;
};
diff.difftastic = {
program = lib.getExe pkgs.difftastic;
diff-args = [
"--color=auto"
"--background=dark"
"--display=side-by-side-show-both"
"$left"
"$right"
];
};
signing = {
sign-all = true;
backend = cfg.signingBackend;
key = cfg.signingKey;
};
};
};
home.packages = with pkgs; [ watchman ];
};
}

View file

@ -93,6 +93,13 @@ in
}
];
};
jujutsu = {
enable = true;
name = "Erwin Boskma";
email = "erwin@horus.nu";
signingKey = "~/.ssh/id_ed25519_sk_horus.pub";
signingBackend = "ssh";
};
mpd.enable = true;
neovim.enable = true;
nushell.enable = true;