From 2e466e6ecad2158beded13931daa785dc7f8410f Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sun, 18 May 2025 16:33:19 +0800 Subject: [PATCH] feat(homes/rafiq): add git config --- homes/x86_64-linux/rafiq/default.nix | 30 ++++++++++++++++++++++++---- modules/hm/cli/default.nix | 13 ++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 modules/hm/cli/default.nix diff --git a/homes/x86_64-linux/rafiq/default.nix b/homes/x86_64-linux/rafiq/default.nix index 43f9e93..e293250 100644 --- a/homes/x86_64-linux/rafiq/default.nix +++ b/homes/x86_64-linux/rafiq/default.nix @@ -3,15 +3,14 @@ { home.stateVersion = "24.11"; + home.file = { + }; + home.packages = with pkgs; [ git neovim ripgrep ]; - - home.file = { - }; - home.sessionVariables = { EDITOR = "nvim"; }; @@ -22,4 +21,27 @@ directories = [ ]; allowOther = true; }; + + home.sessionVariables.GIT_CONFIG_GLOBAL = "$HOME/.config/git/config"; + home.shellAliases = { + gs = "git status"; + gc = "git commit"; + gcam = "git commit -am"; + gu = "git push"; + gy = "git pull"; + }; + programs.git = { + enable = true; + userName = "Mohammad Rafiq"; + userEmail = "rafiq@rrv.sh"; + signing.key = "~/.ssh/id_ed25519.pub"; + signing.signByDefault = true; + extraConfig = { + init.defaultBranch = "prime"; + push.autoSetupRemote = true; + pull.rebase = false; + core.editor = "$EDITOR"; + gpg.format = "ssh"; + }; + }; } diff --git a/modules/hm/cli/default.nix b/modules/hm/cli/default.nix new file mode 100644 index 0000000..0df0128 --- /dev/null +++ b/modules/hm/cli/default.nix @@ -0,0 +1,13 @@ +{config, lib, osConfig, ... }: +{ + imports = [ + ]; + + options.cli = { + + }; + + config = { + + }; +}