Compare commits
2 commits
38ff39bc78
...
36df032ecd
Author | SHA1 | Date | |
---|---|---|---|
Geoffrey Frogeye | 36df032ecd | ||
Geoffrey Frogeye | a43209a902 |
|
@ -1,6 +1,9 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.programs.git;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.programs.git.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "git-sync";
|
||||
|
@ -26,46 +29,70 @@
|
|||
);
|
||||
})
|
||||
];
|
||||
programs.git = {
|
||||
package = pkgs.gitFull;
|
||||
aliases = {
|
||||
"git" = "!exec git"; # In case I write one too many git
|
||||
programs = {
|
||||
git = {
|
||||
package = pkgs.gitFull;
|
||||
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 = [
|
||||
"*.swp"
|
||||
"*.swo"
|
||||
"*.ycm_extra_conf.py"
|
||||
"tags"
|
||||
".mypy_cache"
|
||||
];
|
||||
delta = {
|
||||
jujutsu = {
|
||||
enable = true;
|
||||
options = {
|
||||
line-numbers = true;
|
||||
syntax-theme = "base16";
|
||||
settings = {
|
||||
git.auto-local-bookmark = true;
|
||||
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 = {
|
||||
git-sync = {
|
||||
|
|
Loading…
Reference in a new issue