mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
Reorganize home modules into logical categories (#100)
This commit is contained in:
parent
995d47db17
commit
d64bacdb90
39 changed files with 44 additions and 43 deletions
63
modules/home/cli/git.nix
Normal file
63
modules/home/cli/git.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ pkgs, flake, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
git-filter-repo
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
ignores = [ "*~" "*.swp" ];
|
||||
lfs.enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = flake.config.me.fullname;
|
||||
email = flake.config.me.email;
|
||||
};
|
||||
alias = {
|
||||
co = "checkout";
|
||||
ci = "commit";
|
||||
cia = "commit --amend";
|
||||
s = "status";
|
||||
st = "status";
|
||||
b = "branch";
|
||||
# p = "pull --rebase";
|
||||
pu = "push";
|
||||
};
|
||||
init.defaultBranch = "master"; # Undo breakage due to https://srid.ca/luxury-belief
|
||||
#protocol.keybase.allow = "always";
|
||||
credential.helper = "store --file ~/.git-credentials";
|
||||
pull.rebase = "false";
|
||||
|
||||
# Branch with most recent change comes first
|
||||
branch.sort = "-committerdate";
|
||||
# Remember and auto-resolve merge conflicts
|
||||
# https://git-scm.com/book/en/v2/Git-Tools-Rerere
|
||||
rerere.enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.delta = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
options = {
|
||||
navigate = true;
|
||||
light = false;
|
||||
side-by-side = true;
|
||||
line-numbers = true;
|
||||
pager = "${pkgs.less}/bin/less --mouse --wheel-lines=3";
|
||||
};
|
||||
};
|
||||
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# This looks better with the kitty theme.
|
||||
gui.theme = {
|
||||
lightTheme = false;
|
||||
activeBorderColor = [ "white" "bold" ];
|
||||
inactiveBorderColor = [ "white" ];
|
||||
selectedLineBgColor = [ "reverse" "white" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue