From 301169df9c14dcef34baf755b9b6f3d0e952b252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Niemier?= <~@hauleth.dev> Date: Sat, 13 Dec 2025 20:15:49 +0100 Subject: [PATCH] Cleanup Home-Manager warnings --- modules/git.nix | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/modules/git.nix b/modules/git.nix index c8c8546..a142fa8 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -33,10 +33,14 @@ # pkgs.radicle-node ]; + programs.diff-so-fancy = { + enable = true; + enableGitIntegration = true; + }; + programs.git = { enable = true; - diff-so-fancy.enable = true; lfs.enable = true; attributes = [ @@ -66,27 +70,27 @@ ignores = inputs.self.lib.readFileWithComments ./git/ignore; - aliases = { - b = "branch"; - ca = "commit --amend"; - ci = "commit"; - co = "checkout"; - rci = "commit --amend --reuse-message HEAD"; + settings = { + alias = { + b = "branch"; + ca = "commit --amend"; + ci = "commit"; + co = "checkout"; + rci = "commit --amend --reuse-message HEAD"; - lg = "log --color --graph --abbrev-commit --pretty=simple-oneline"; + lg = "log --color --graph --abbrev-commit --pretty=simple-oneline"; - squash = "!git rebase -i \"$(git merge-base HEAD \"$(git default-branch)\")\""; + squash = "!git rebase -i \"$(git merge-base HEAD \"$(git default-branch)\")\""; - st = "status -sb"; - todo = "grep -Ee '\\\\bTODO:?\\\\b'"; - fixme = "grep -Ee '\\\\bFIX(ME)?:?\\\\b'"; + st = "status -sb"; + todo = "grep -Ee '\\\\bTODO:?\\\\b'"; + fixme = "grep -Ee '\\\\bFIX(ME)?:?\\\\b'"; - default-branch = "!git symbolic-ref --short refs/remotes/origin/HEAD | sed 's|^origin/||'"; + default-branch = "!git symbolic-ref --short refs/remotes/origin/HEAD | sed 's|^origin/||'"; - cleanup = "!git branch --format=\"%(if:notequals=*)%(HEAD)%(then)%(if:notequals=\${1:-$(git default-branch)})%(refname:lstrip=2)%(then)%(refname:lstrip=2)%(end)%(end)\" --merged \"\$(git default-branch)\" | xargs -rpxL1 git branch -d"; - }; + cleanup = "!git branch --format=\"%(if:notequals=*)%(HEAD)%(then)%(if:notequals=\${1:-$(git default-branch)})%(refname:lstrip=2)%(then)%(refname:lstrip=2)%(end)%(end)\" --merged \"\$(git default-branch)\" | xargs -rpxL1 git branch -d"; + }; - extraConfig = { core.commitGraph = true; init.defaultBranch = "master"; -- 2.51.2