1
Fork 0
satellite/home/features/cli/git.nix

70 lines
1.5 KiB
Nix
Raw Normal View History

2023-07-07 21:25:05 +02:00
{ pkgs, ... }: {
2024-03-05 00:03:41 +01:00
home.packages = [ pkgs.josh ]; # Just One Single History
2023-12-10 23:48:46 +01:00
# TODO: use `delta` as a pager, as highlighted here
# https://github.com/lilyinstarlight/foosteros/blob/main/config/base.nix#L163
2023-01-10 02:38:06 +01:00
programs.git = {
enable = true;
package = pkgs.gitFull;
userName = "prescientmoon";
2024-02-13 00:02:19 +01:00
userEmail = "git@moonythm.dev";
2023-01-10 02:38:06 +01:00
2023-12-10 23:48:46 +01:00
# {{{ Globally ignored files
2023-07-07 21:25:05 +02:00
ignores = [
# Syncthing
".stfolder"
".stversions"
2023-09-22 18:37:24 +02:00
# Direnv
".direnv"
2023-09-22 18:37:24 +02:00
".envrc"
2023-09-22 20:08:11 +02:00
# Haskell
# NOTE: THIS IS A BAD IDEA
# I need to figure out a better way (this is simply here because
# a project I contribute to doesn't gitignore this file, nor does
# it have it commited).
"hie.yaml"
2023-07-07 21:25:05 +02:00
];
2023-12-10 23:48:46 +01:00
# }}}
# {{{ Aliases
2023-09-22 18:37:24 +02:00
aliases = {
# Print history nicely
graph = "log --decorate --oneline --graph";
# Print last commit's hash
hash = "log -1 --format='%H'";
2024-02-09 20:18:48 +01:00
# Count the number of commits
count = "rev-list --count --all";
2023-09-22 18:37:24 +02:00
};
2023-12-10 23:48:46 +01:00
# }}}
2023-09-22 18:37:24 +02:00
2023-01-10 02:38:06 +01:00
extraConfig = {
github.user = "Mateiadrielrafael";
hub.protocol = "ssh";
core.editor = "nvim";
2023-03-31 19:45:20 +02:00
init.defaultBranch = "main";
2023-09-22 18:37:24 +02:00
rebase.autoStash = true;
2023-12-10 23:48:46 +01:00
# {{{ Signing
# Sign commits using ssh
gpg.format = "ssh";
user.signingkey = "~/.ssh/id_ed25519.pub";
# Sign everything by default
commit.gpgsign = true;
tag.gpgsign = true;
2023-12-10 23:48:46 +01:00
# }}}
2023-01-10 02:38:06 +01:00
};
};
2023-12-10 23:48:46 +01:00
# {{{ Github cli
programs.gh = {
enable = true;
settings.git_protocol = "ssh";
};
2023-12-10 23:48:46 +01:00
# }}}
2023-01-10 02:38:06 +01:00
}