From 6caf91b208bbdaa294ae0b4ba49195eac584e696 Mon Sep 17 00:00:00 2001 From: moons-14 Date: Wed, 11 Mar 2026 16:47:40 +0900 Subject: [PATCH] home: fix deprecated git and ssh option names Co-Authored-By: Claude Sonnet 4.6 --- modules/home/git.nix | 33 +++++++++++++++------------------ modules/home/ssh.nix | 13 +++++++------ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/modules/home/git.nix b/modules/home/git.nix index 015c9c8..1f6d84f 100644 --- a/modules/home/git.nix +++ b/modules/home/git.nix @@ -2,34 +2,31 @@ { programs.git = { enable = true; - userName = "moons-14"; - userEmail = "moons@moons14.com"; - ignores = [ ".direnv/" ".envrc" "!.envrc.example" ]; - extraConfig = { + settings = { + user.name = "moons-14"; + user.email = "moons@moons14.com"; push.default = "simple"; credential.helper = "cache --timeout=7200"; init.defaultBranch = "main"; - log.decorate = "full"; # Show branch/tag info in git log - log.date = "iso"; # ISO 8601 date format - # Conflict resolution style for readable diffs + log.decorate = "full"; + log.date = "iso"; merge.conflictStyle = "diff3"; - }; - # Optional: FOSS-friendly Git aliases - aliases = { - br = "branch --sort=-committerdate"; - co = "checkout"; - df = "diff"; - com = "commit -a"; - gs = "stash"; - gp = "pull"; - lg = "log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %C(green)(%cr)%C(bold blue) <%an>%Creset' --abbrev-commit"; - st = "status"; + alias = { + br = "branch --sort=-committerdate"; + co = "checkout"; + df = "diff"; + com = "commit -a"; + gs = "stash"; + gp = "pull"; + lg = "log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %C(green)(%cr)%C(bold blue) <%an>%Creset' --abbrev-commit"; + st = "status"; + }; }; }; } diff --git a/modules/home/ssh.nix b/modules/home/ssh.nix index f63ce67..e45ff6b 100644 --- a/modules/home/ssh.nix +++ b/modules/home/ssh.nix @@ -32,11 +32,12 @@ }; }; - extraConfig = '' - Host * - AddKeysToAgent yes - IdentityFile ~/.ssh/id_ed25519 - ''; + enableDefaultConfig = false; + + matchBlocks."*" = { + identityFile = "~/.ssh/id_ed25519"; + extraOptions.AddKeysToAgent = "yes"; + }; }; home.activation.generateSshKey = lib.hm.dag.entryAfter [ "writeBoundary" ] '' @@ -58,7 +59,7 @@ signByDefault = true; }; - extraConfig = { + settings = { gpg.format = "ssh"; tag.gpgSign = true; };