2024-11-22 17:58:24 -05:00
|
|
|
self: {
|
|
|
|
config,
|
|
|
|
lib,
|
2024-06-08 23:40:44 -04:00
|
|
|
pkgs,
|
|
|
|
...
|
2024-06-23 13:21:02 -04:00
|
|
|
}: let
|
2024-11-22 17:58:24 -05:00
|
|
|
inherit (lib) mkIf;
|
|
|
|
|
|
|
|
cfg = config.programs.bash;
|
|
|
|
|
2024-06-23 13:21:02 -04:00
|
|
|
mkRemoteConf = remote: email: name: {
|
|
|
|
condition = "hasconfig:remote.*.url:${remote}:*/**";
|
|
|
|
contents.user = {inherit email name;};
|
|
|
|
};
|
|
|
|
mkDefaultRemote = remote: mkRemoteConf remote "matt@nelim.org" "matt1432";
|
|
|
|
in {
|
2024-11-22 17:58:24 -05:00
|
|
|
config.programs = mkIf cfg.enable {
|
2023-10-15 16:41:34 -04:00
|
|
|
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-11-22 17:58:24 -05:00
|
|
|
# For accurate stack trace
|
|
|
|
_file = ./default.nix;
|
2023-10-15 16:41:34 -04:00
|
|
|
}
|