From c81dbe25edcf6b46117c728b21455cdb5dd732d3 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Fri, 31 Oct 2025 14:54:18 -0400 Subject: [PATCH] added git config defaults and overrides --- dot_config/flake/home/common.nix | 34 ++++++++++++++++++++++- dot_config/flake/machines/hinge/home.nix | 35 +++++++++++++----------- dot_config/git/{config => config.old} | 0 3 files changed, 52 insertions(+), 17 deletions(-) rename dot_config/git/{config => config.old} (100%) diff --git a/dot_config/flake/home/common.nix b/dot_config/flake/home/common.nix index 09caa93..d53c15a 100644 --- a/dot_config/flake/home/common.nix +++ b/dot_config/flake/home/common.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{lib, pkgs, ...}: { home.enableNixpkgsReleaseCheck = false; xdg.enable = true; @@ -42,6 +42,38 @@ yaml-language-server ]; + programs.git = { + enable = true; + settings = { + # Default author info + author = lib.mkDefault { + email = "tyler@mayoff.ca"; + name = "Tyler Mayoff"; + }; + + user = lib.mkDefault { + email = "tyler@mayoff.ca"; + name = "Tyle Mayoff"; + }; + + init = { + defaultBranch = "main"; + }; + + core = { + excludesFile = "~/.config/git/ignore"; + }; + + pull = { + rebase = true; + }; + + push = { + autoSetupRemote = true; + }; + }; + }; + programs.nh = { enable = true; package = pkgs.unstable.nh; diff --git a/dot_config/flake/machines/hinge/home.nix b/dot_config/flake/machines/hinge/home.nix index 22a9ef5..6fefaa3 100644 --- a/dot_config/flake/machines/hinge/home.nix +++ b/dot_config/flake/machines/hinge/home.nix @@ -6,11 +6,28 @@ ../../modules/darwin/PaperWM.spoon ]; - # xdg.enable = lib.mkForce false; - targets.darwin.linkApps.enable = false; targets.darwin.copyApps.enable = true; + programs.git = { + lfs.enable = true; + settings = { + author = { + email = "tyler.mayoff@hingehealth.com"; + name = "Tyler Mayoff"; + }; + + gpg.format = "ssh"; + commit.gpgsign = true; + + user = { + email = "tyler.mayoff@hingehealth.com"; + name = "Tyle Mayoff"; + signingkey = "~/.ssh/id_ed25519.pub"; + }; + }; + }; + home = { username = "tyler.mayoff"; # homeDirectory = /Users/tyler.mayoff; @@ -54,22 +71,8 @@ file.".gnupg/gpg-agent.conf".text = '' pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac ''; - - file.".config/sketchybar/sketchybarrc" = { - executable = true; - text = '' - #!/usr/bin/env lua - - package.cpath = package.cpath .. ";${pkgs.sbarlua}/lib/lua/5.4/sketchybar.so" - - -- Load the sketchybar-package and prepare the helper binaries - require("helpers") - require("init") - ''; - }; }; programs.home-manager.enable = true; - home.stateVersion = "24.11"; } diff --git a/dot_config/git/config b/dot_config/git/config.old similarity index 100% rename from dot_config/git/config rename to dot_config/git/config.old