2024-06-08 23:40:44 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
self,
|
|
|
|
...
|
|
|
|
}: {
|
2023-10-15 16:41:34 -04:00
|
|
|
programs = {
|
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
lfs.enable = true;
|
|
|
|
|
|
|
|
includes = [
|
2024-06-10 22:57:20 -04:00
|
|
|
{path = toString self.legacyPackages.${pkgs.system}.dracula.git;}
|
2024-01-24 16:09:42 -05:00
|
|
|
|
|
|
|
{
|
2024-06-09 22:49:30 -04:00
|
|
|
# FIXME: add https config
|
2024-01-24 16:09:42 -05:00
|
|
|
condition = "hasconfig:remote.*.url:git@github.com:*/**";
|
|
|
|
contents = {
|
|
|
|
user = {
|
|
|
|
email = "matt@nelim.org";
|
|
|
|
name = "matt1432";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
condition = "hasconfig:remote.*.url:git@git.nelim.org:*/**";
|
|
|
|
contents = {
|
|
|
|
user = {
|
|
|
|
email = "matt@nelim.org";
|
|
|
|
name = "matt1432";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
condition = "hasconfig:remote.*.url:git@gitlab.info.uqam.ca:*/**";
|
|
|
|
contents = {
|
|
|
|
user = {
|
|
|
|
email = "gj591944@ens.uqam.ca";
|
|
|
|
name = "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;
|
|
|
|
line-numbers-zero-style = "#E6EDF3"; #BD93F9";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
};
|
2023-10-20 16:22:28 -04:00
|
|
|
};
|
2023-10-15 16:41:34 -04:00
|
|
|
};
|
|
|
|
};
|
2024-03-13 12:52:07 -04:00
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
(writeShellApplication {
|
|
|
|
name = "chore";
|
|
|
|
runtimeInputs = [git];
|
|
|
|
|
|
|
|
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
|
|
|
}
|