diff --git a/modules/shell/git.nix b/modules/shell/git.nix index 2ff9aee..86917c5 100644 --- a/modules/shell/git.nix +++ b/modules/shell/git.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{pkgs, lib, ...}: { environment.systemPackages = with pkgs; [ git gh @@ -7,18 +7,26 @@ fireproof.home-manager.programs.git = { enable = true; + userEmail = "nickolaj@fireproof.website"; userName = "Nickolaj Jepsen"; + extraConfig = { gpg.format = "ssh"; gpg.ssh.program = "op-ssh-sign"; push.autosetupremote = "true"; pull.rebase = "true"; + rebase.autosqush = "true"; rerere.enabled = true; init.defaultBranch = "main"; }; + delta.enable = true; + aliases = { + "fixup" = "!git log -n 50 --pretty=format:'%h %s' --no-merges | ${lib.getExe pkgs.fzf} | cut -c -7 | xargs -o git commit --fixup"; + }; + includes = [ { condition = "hasconfig:remote.*.url:git@github.com:Digital-Udvikling/**";