Files
nixos-config/home/common/programs/git/default.nix
T
Miguel Palhas 39e6276c7d Session overhaul: dev tooling, cleanup, theming, fixes
Tooling:
- nh + nvd/nom/statix/deadnix/comma (new programs/nix.nix); GC via nh clean
- zoxide (cd), atuin, just, lazydocker, dust, duf, difftastic (git dft)

Structure:
- rename desktop -> konishi; homeConfigurations -> "user@host" for nh autodetect

Removals (heavy/unused):
- android-studio, unity/.NET/omnisharp/vscode, kicad, zoom, calibre,
  google-fonts, nerd-dictation

Screen recording:
- kooha + vokoscreen-ng + `webcam` corner-cam command/window-rule

Fixes:
- WEBKIT_DISABLE_DMABUF_RENDERER moved to common (electron/tauri on intel)
- kitty pinned to Catppuccin-Mocha; darkman no longer toggles kitty/claude
- claude theme dark + statusline locale fix
- ssh: migrate to settings API + multiplexing/keepalive/AddKeysToAgent;
  gpg-agent enableSshSupport
- silence hyprland configType / gtk4 / xdg userDirs deprecations

Flake hygiene:
- follows=nixpkgs for foundry/hardware/rose-pine/zen/spicetify (10->5 nixpkgs)
- zoxide _ZO_DOCTOR=0

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 18:17:25 +01:00

104 lines
2.5 KiB
Nix

{ pkgs, ... }:
{
xdg.configFile = {
"git/commit-message.txt".source = ./commit-message.txt;
"git/ignore".source = ./ignore;
"git/scripts".source = ./scripts;
};
programs = {
git = {
enable = true;
settings = {
user = {
name = "Miguel Palhas";
email = "mpalhas@gmail.com";
};
alias = {
ls = "log --color --graph --oneline --decorate --topo-order --pretty=format:'%C(yellow)%d%Creset %Cgreen(%cr)%Creset %C(bold blue)[%an]%Creset %s %Cred(%h)%Creset' --abbrev-commit";
ll = ''log --reverse --pretty=format:"%C(yellow)%h%Cred%d\ %Creset%s%Cblue\ [%an]" --decorate --numstat'';
conf = "diff --name-only --diff-filter=U";
ba = "branch -a";
pb = "publish";
ps = "push -u";
pr = "pull-request";
ppr = "push-pr";
cpr = "close-pr";
opr = "open-pr";
f = "fetch";
c = "commit --verbose";
d = "diff";
dc = "diff --cached";
co = "checkout";
s = "status -sb";
b = "better-branch";
rb = "rebase";
rbc = "rebase --continue";
w = "commit -am 'wip'";
# Structural (AST-aware) diff on demand; `git d`/`diff` stays delta.
# Accepts args, e.g. `git dft HEAD~3`.
dft = "!GIT_EXTERNAL_DIFF=difft git diff";
};
init = {
defaultBranch = "main";
};
core = {
editor = "nvim";
pager = "delta";
askpass = "";
};
credential = {
helper = "store";
};
"credential \"https://git.naps.pt\"" = {
helper = "!tea login helper";
};
merge = {
conflictstyle = "zdiff3";
};
commit = {
template = "~/.config/git/commit-message.txt";
};
push = {
default = "upstream";
};
delta = {
navigate = true;
side-by-side = true;
};
"diff \"image\"" = {
textconv = "mediainfo";
};
"diff \"text\"" = {
textconv = "fold -s -w80";
};
};
};
gh = {
enable = true;
settings = {
aliases = {
co = "pr checkout";
ls = "pr list";
pv = "pr view";
};
};
};
};
home = {
packages = with pkgs; [
delta
difftastic
git-crypt
mediainfo
tea
];
sessionPath = [
"$HOME/.config/git/scripts"
];
};
}