From 9a1f7cfe75e7c84dacbf7ccf53199a0304931fc0 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Thu, 12 Feb 2026 13:13:00 +0100 Subject: [PATCH] git: add some neat config options --- modules/base/home/git.nix | 24 +++++------ modules/base/home/zed.nix | 83 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 11 deletions(-) create mode 100644 modules/base/home/zed.nix diff --git a/modules/base/home/git.nix b/modules/base/home/git.nix index 049ccbe..b874728 100644 --- a/modules/base/home/git.nix +++ b/modules/base/home/git.nix @@ -49,22 +49,24 @@ topLevel: { }; core = { fsmonitor = true; + editor = "hx"; }; - init = { - defaultBranch = "main"; - }; - pull = { - rebase = true; - }; - push = { - autoSetupRemote = true; + commit.verbose = true; + init.defaultBranch = "main"; + pull.rebase = true; + fetch = { + prune = true; + pruneTags = true; }; + push.autoSetupRemote = true; rebase = { autoStash = true; + autoSquash = true; }; - safe = { - directory = "/home/${username}/projects/config"; - }; + merge.conflictstyle = "zdiff3"; + safe.directory = "/home/${username}/projects/config"; + submodules.recurse = true; + help.autocorrect = "prompt"; maintenance = { repo = [ "/home/${username}/projects/NixOS/nixpkgs" diff --git a/modules/base/home/zed.nix b/modules/base/home/zed.nix new file mode 100644 index 0000000..2877b18 --- /dev/null +++ b/modules/base/home/zed.nix @@ -0,0 +1,83 @@ +{ + flake.modules = { + homeManager.cholli = + { lib, pkgs, ... }: + { + programs.zed-editor = { + enable = true; + + userSettings = { + auto_install_extensions = { + nix = true; + catppuccin = true; + catppuccin-icons = true; + }; + + auto_update = false; + + base_keymap = "JetBrains"; + helix_mode = true; + vim_mode = false; + + ui_font_family = "FiraCode Nerd Font"; + ui_font_size = 16; + buffer_font_family = "FiraCode Nerd Font"; + buffer_font_size = 16; + + autosave = "on_focus_change"; + + theme = { + mode = "system"; + light = "Catppuccin Latte"; + dark = "Catppuccin Macchiato"; + }; + + load_direnv = "shell_hook"; + terminal = { + font_family = "FiraCode Nerd Font"; + font_size = 16; + }; + + agent = { + enabled = true; + + default_model = { + provider = "copilot_chat"; + model = "gpt-4o"; + }; + }; + + agent_servers = { + github-copilot = { + type = "registry"; + }; + }; + + edit_predictions.mode = "eager"; + features = { + edit_prediction_provider = "copilot"; + }; + + inlay_hints.enabled = true; + lsp = { + nixd = { + binary = { + path = lib.getExe pkgs.nixd; + }; + }; + }; + + }; + + userKeymaps = [ + { + context = "Workspace"; + bindings = { + "shift shift" = "file_finder::Toggle"; + }; + } + ]; + }; + }; + }; +}