diff options
| author | Copilot <198982749+Copilot@users.noreply.github.com> | 2026-03-01 18:56:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-01 18:56:27 +0100 |
| commit | 011486787f639f2d2474bbaf5a6ef3d77fb45a43 (patch) | |
| tree | c443f2c41053e2ed7599e9e676302dfa30dc89d4 /modules/home/git.nix | |
| parent | eb7c55e9dc97524cca7c5b6a268cd66af147b12e (diff) | |
| download | dotfiles-011486787f639f2d2474bbaf5a6ef3d77fb45a43.tar.gz dotfiles-011486787f639f2d2474bbaf5a6ef3d77fb45a43.zip | |
Refactor dotfiles to declarative Nix management (nix-darwin + home-manager) (#5)
Diffstat (limited to 'modules/home/git.nix')
| -rw-r--r-- | modules/home/git.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/modules/home/git.nix b/modules/home/git.nix new file mode 100644 index 0000000..b42161e --- /dev/null +++ b/modules/home/git.nix @@ -0,0 +1,50 @@ +{ ... }: + +{ + programs.git = { + enable = true; + userName = "Simen A. W. Olsen"; + userEmail = "hello@simenandre.no"; + + signing = { + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMCyUn5BfmAnd/6xi0X1mYF/+jPOmCS0bpNUePF55gCY"; + signByDefault = true; + }; + + extraConfig = { + apply.whitespace = "fix"; + core = { + trustctime = false; + editor = "nvim"; + excludesfile = "~/.gitignore_global"; + }; + color.ui = "auto"; + "color \"branch\"" = { + current = "yellow reverse"; + local = "yellow"; + remote = "green"; + }; + "color \"diff\"" = { + meta = "yellow bold"; + frag = "magenta bold"; + old = "red"; + new = "green"; + }; + "color \"status\"" = { + added = "yellow"; + changed = "green"; + untracked = "cyan"; + }; + diff.renames = "copies"; + help.autocorrect = 1; + merge.log = true; + push.autoSetupRemote = true; + gpg.format = "ssh"; + "gpg \"ssh\"".program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"; + github.user = "simenandre"; + pull.rebase = true; + "url \"ssh://git@github.com/\"".insteadOf = "https://github.com/"; + commit.gpgsign = true; + }; + }; +} |
