2021-02-08 19:19:18 +01:00
|
|
|
|
{ config, pkgs, ... }:
|
2020-11-07 15:40:07 +01:00
|
|
|
|
{
|
|
|
|
|
programs.git = {
|
|
|
|
|
enable = true;
|
|
|
|
|
userName = "Simon Bruder";
|
|
|
|
|
userEmail = "simon@sbruder.de";
|
|
|
|
|
signing = {
|
2020-12-24 23:08:05 +01:00
|
|
|
|
key = config.programs.gpg.settings.default-key;
|
2020-11-07 15:40:07 +01:00
|
|
|
|
signByDefault = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extraConfig = {
|
|
|
|
|
core.quotepath = "off";
|
|
|
|
|
pull.ff = "only";
|
2021-02-08 19:19:18 +01:00
|
|
|
|
diff = {
|
|
|
|
|
age = {
|
|
|
|
|
# This uses the de facto default key location with no ability to
|
|
|
|
|
# specify another key.
|
|
|
|
|
# If decryption fails (e.g. due to a lack of the right private key,
|
|
|
|
|
# rage’s error message will be displayed instead of the file’s
|
|
|
|
|
# contents.
|
|
|
|
|
textconv = toString (pkgs.writeShellScript "git-age-textconv" ''
|
|
|
|
|
${pkgs.rage}/bin/rage -d -i ${config.xdg.configHome}/age/keys.txt "$@" 2>&1 || true
|
|
|
|
|
'');
|
|
|
|
|
};
|
|
|
|
|
};
|
2020-11-07 15:40:07 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ignores = [
|
|
|
|
|
"*.swp"
|
|
|
|
|
".direnv"
|
|
|
|
|
"Session.vim"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
lfs.enable = true;
|
|
|
|
|
delta = {
|
|
|
|
|
enable = true;
|
|
|
|
|
options = {
|
|
|
|
|
line-numbers = "true";
|
|
|
|
|
side-by-side = "true";
|
|
|
|
|
features = "decorations";
|
|
|
|
|
syntax-theme = "base16";
|
|
|
|
|
decorations = {
|
|
|
|
|
commit-decoration-style = "bold yellow box ul";
|
|
|
|
|
file-style = "bold yellow ul";
|
|
|
|
|
file-decoration-style = "none";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|