2024-06-08 23:40:44 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
self,
|
|
|
|
...
|
2024-06-23 13:21:02 -04:00
|
|
|
}: let
|
|
|
|
mkRemoteConf = remote: email: name: {
|
|
|
|
condition = "hasconfig:remote.*.url:${remote}:*/**";
|
|
|
|
contents.user = {inherit email name;};
|
|
|
|
};
|
|
|
|
mkDefaultRemote = remote: mkRemoteConf remote "matt@nelim.org" "matt1432";
|
|
|
|
in {
|
2023-10-15 16:41:34 -04:00
|
|
|
programs = {
|
|
|
|
git = {
|
|
|
|
enable = true;
|
2024-08-10 21:53:54 -04:00
|
|
|
package = pkgs.gitFull;
|
|
|
|
|
2023-10-15 16:41:34 -04:00
|
|
|
lfs.enable = true;
|
|
|
|
|
|
|
|
includes = [
|
2024-11-20 15:17:55 -05:00
|
|
|
{path = toString self.scopedPackages.${pkgs.system}.dracula.git;}
|
2024-01-24 16:09:42 -05:00
|
|
|
|
2024-06-23 13:21:02 -04:00
|
|
|
(mkDefaultRemote "https://github.com")
|
|
|
|
(mkDefaultRemote "git@github.com")
|
|
|
|
(mkDefaultRemote "git@git.nelim.org")
|
2024-01-24 16:09:42 -05:00
|
|
|
|
2024-06-23 13:21:02 -04:00
|
|
|
(mkRemoteConf "git@gitlab.info.uqam.ca" "gj591944@ens.uqam.ca" "Mathis Hurtubise")
|
2023-10-15 16:41:34 -04:00
|
|
|
];
|
2023-10-20 16:22:28 -04:00
|
|
|
|
|
|
|
delta = {
|
|
|
|
enable = true;
|
|
|
|
options = {
|
|
|
|
side-by-side = true;
|
2024-08-10 21:53:54 -04:00
|
|
|
line-numbers-zero-style = "#E6EDF3";
|
2023-10-20 16:22:28 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-03-01 01:34:59 -05:00
|
|
|
extraConfig = {
|
|
|
|
diff.sopsdiffer.textconv = "sops --config /dev/null -d";
|
|
|
|
|
|
|
|
# https://github.com/dandavison/delta/issues/630#issuecomment-860046929
|
|
|
|
pager = let
|
|
|
|
cmd = "LESS='LRc --mouse' ${pkgs.delta}/bin/delta";
|
|
|
|
in {
|
|
|
|
diff = cmd;
|
|
|
|
show = cmd;
|
|
|
|
stash = cmd;
|
|
|
|
log = cmd;
|
|
|
|
reflog = cmd;
|
|
|
|
};
|
2024-08-10 21:53:54 -04:00
|
|
|
|
|
|
|
sendemail = {
|
|
|
|
smtpserver = "127.0.0.1";
|
|
|
|
smtpuser = "matt@nelim.org";
|
|
|
|
smtpencryption = "tls";
|
|
|
|
smtpserverport = 1025;
|
|
|
|
smtpsslcertpath = "";
|
|
|
|
};
|
2023-10-20 16:22:28 -04:00
|
|
|
};
|
2023-10-15 16:41:34 -04:00
|
|
|
};
|
|
|
|
};
|
2024-03-13 12:52:07 -04:00
|
|
|
|
2024-08-31 19:16:06 -04:00
|
|
|
home.packages = [
|
|
|
|
(pkgs.writeShellApplication {
|
2024-03-13 12:52:07 -04:00
|
|
|
name = "chore";
|
2024-08-31 19:16:06 -04:00
|
|
|
runtimeInputs = [pkgs.git];
|
2024-03-13 12:52:07 -04:00
|
|
|
|
|
|
|
text = ''
|
2024-03-26 13:55:55 -04:00
|
|
|
DIR=''${1:-"$FLAKE"}
|
|
|
|
|
|
|
|
cd "$DIR" || exit 1
|
2024-03-13 12:52:07 -04:00
|
|
|
|
|
|
|
git add flake.lock
|
|
|
|
git commit -m 'chore: update flake.lock'
|
|
|
|
git push
|
|
|
|
'';
|
|
|
|
})
|
|
|
|
];
|
2023-10-15 16:41:34 -04:00
|
|
|
}
|