Hmm, jujutsu merge commit I guess?

This commit is contained in:
Geoffrey Frogeye 2024-09-15 15:38:56 +02:00
commit 36df032ecd
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -1,6 +1,9 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let
cfg = config.programs.git;
in
{ {
config = lib.mkIf config.programs.git.enable { config = lib.mkIf cfg.enable {
home.packages = [ home.packages = [
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "git-sync"; name = "git-sync";
@ -26,46 +29,70 @@
); );
}) })
]; ];
programs.git = { programs = {
package = pkgs.gitFull; git = {
aliases = { package = pkgs.gitFull;
"git" = "!exec git"; # In case I write one too many git aliases = {
"git" = "!exec git"; # In case I write one too many git
};
ignores = [
"*.swp"
"*.swo"
"*.ycm_extra_conf.py"
"tags"
".mypy_cache"
];
delta = {
enable = true;
options = {
line-numbers = true;
syntax-theme = "base16";
};
};
# Also tried difftastic, and while I like the default theme it's a bit
# less configurable
lfs.enable = true;
userEmail = lib.mkDefault "geoffrey@frogeye.fr";
userName = lib.mkDefault "Geoffrey Frogeye";
extraConfig = {
core = {
editor = "nvim";
};
push = {
default = "matching";
};
pull = {
ff = "only";
};
} // lib.optionalAttrs config.frogeye.desktop.xorg {
diff.tool = "meld";
difftool.prompt = false;
"difftool \"meld\"".cmd = "${pkgs.meld}/bin/meld \"$LOCAL\" \"$REMOTE\"";
# This escapes quotes, which isn't the case in the original, hoping this isn't an issue.
};
}; };
ignores = [ jujutsu = {
"*.swp"
"*.swo"
"*.ycm_extra_conf.py"
"tags"
".mypy_cache"
];
delta = {
enable = true; enable = true;
options = { settings = {
line-numbers = true; git.auto-local-bookmark = true;
syntax-theme = "base16"; user = {
email = cfg.userEmail;
name = cfg.userName;
};
ui = {
pager = "delta";
diff.format = "git";
diff-editor = "meld-3";
merge-editor = "meld";
};
signing = {
sign-all = true;
backend = "gpg";
inherit (cfg.signing) key;
backends.gpg.allow-expired-keys = false;
};
}; };
}; };
# Also tried difftastic, and while I like the default theme it's a bit
# less configurable
lfs.enable = true;
userEmail = lib.mkDefault "geoffrey@frogeye.fr";
userName = lib.mkDefault "Geoffrey Frogeye";
extraConfig = {
core = {
editor = "nvim";
};
push = {
default = "matching";
};
pull = {
ff = "only";
};
} // lib.optionalAttrs config.frogeye.desktop.xorg {
diff.tool = "meld";
difftool.prompt = false;
"difftool \"meld\"".cmd = "${pkgs.meld}/bin/meld \"$LOCAL\" \"$REMOTE\"";
# This escapes quotes, which isn't the case in the original, hoping this isn't an issue.
};
}; };
services = { services = {
git-sync = { git-sync = {