From 724469c5bb3acfe958a25c1e0163989c69ac1f49 Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Fri, 10 Oct 2025 20:08:35 +0200 Subject: [PATCH] Save detached HEAD changes --- flake.lock | 24 ++++++------- modules/darwin/home/default.nix | 1 + modules/darwin/home/zed.nix | 58 ++++++++++++++++++++++++++++++++ modules/home/default.nix | 4 +-- modules/home/git.nix | 10 ++++++ modules/home/jjui.nix | 5 --- modules/home/jujutsu.nix | 19 ----------- modules/home/neovim/mappings.nix | 11 +----- modules/home/starship.nix | 37 +++++++------------- modules/nixos/home/default.nix | 4 --- modules/nixos/home/zellij.nix | 5 --- modules/packages.nix | 3 +- 12 files changed, 99 insertions(+), 82 deletions(-) create mode 100644 modules/darwin/home/zed.nix delete mode 100644 modules/home/jjui.nix delete mode 100644 modules/home/jujutsu.nix delete mode 100644 modules/nixos/home/zellij.nix diff --git a/flake.lock b/flake.lock index 3ac3d21..6a18788 100644 --- a/flake.lock +++ b/flake.lock @@ -151,11 +151,11 @@ "homebrew-cask": { "flake": false, "locked": { - "lastModified": 1759899363, - "narHash": "sha256-ZVN7/pcvtGxo7phZrYL8SmPaOXNp/cYVsdgZkUTuNuc=", + "lastModified": 1759997506, + "narHash": "sha256-dqWvB1CJI7ksD3ldqPwWjqM3WTTCEuqyGG8XumN8V5c=", "owner": "homebrew", "repo": "homebrew-cask", - "rev": "424dc615f7baf6b6b3954a99caaa6e695766698e", + "rev": "1ca8a5fabd35f99eb93af95f76320205cc99be01", "type": "github" }, "original": { @@ -167,11 +167,11 @@ "homebrew-core": { "flake": false, "locked": { - "lastModified": 1759903608, - "narHash": "sha256-TT5MEMIWkzWrjXS8J6kNKHYVqAf332hlJGMkXCs8CNM=", + "lastModified": 1759987268, + "narHash": "sha256-SfR2OvP6Qu+G4u8Omo1jw4pWZhXeevRq86+2nliCuPo=", "owner": "homebrew", "repo": "homebrew-core", - "rev": "89ee67d66a2135527e95bf9570fa2b6f34cc4ea0", + "rev": "950458f1c06229ddb0aaaf57108ad125cf23f5f4", "type": "github" }, "original": { @@ -228,11 +228,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759903222, - "narHash": "sha256-pufSAv93NSb8ZD6YQwC7xA6/SCEGEr7/Xm2+E2GDHvY=", + "lastModified": 1759997385, + "narHash": "sha256-wRxqHCD0iW+jsWa2hE1HinF90iz7+dfL/T9SA3hoH/E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "59f9c6722b8f24b0014f222715cc3158192f7396", + "rev": "f16815c7683f77a7cd8f204d9d1aca84f5908f6f", "type": "github" }, "original": { @@ -297,11 +297,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1759878636, - "narHash": "sha256-yKMf+iG5KmQkMamtT8wWNFwyjSiluHyH683OcpJh/kQ=", + "lastModified": 1759927289, + "narHash": "sha256-EWdwR9l+JG466rPuNmjjzDPvQAuh37lmhgWa2xeaMdk=", "owner": "nix-community", "repo": "nixvim", - "rev": "c074710027ce3047382326d1fcc1a4e174cccfcc", + "rev": "57006a3ace4a3c889ab61b70fd5d8b197de8314e", "type": "github" }, "original": { diff --git a/modules/darwin/home/default.nix b/modules/darwin/home/default.nix index 5fceea1..b16213c 100644 --- a/modules/darwin/home/default.nix +++ b/modules/darwin/home/default.nix @@ -7,6 +7,7 @@ in { imports = [ ./ghostty.nix + ./zed.nix ]; home = { diff --git a/modules/darwin/home/zed.nix b/modules/darwin/home/zed.nix new file mode 100644 index 0000000..0c81e39 --- /dev/null +++ b/modules/darwin/home/zed.nix @@ -0,0 +1,58 @@ +{pkgs, ...}: +{ + programs.zed-editor = { + enable = true; + extraPackages = [ + pkgs.vtsls + ]; + userSettings = { + theme = { + mode = "system"; + light = "One Light"; + dark = "Catppuccin Mocha"; + }; + buffer_font_family = "Iosevka Nerd Font"; + buffer_font_size = 17; + ui_font_family = "Iosevka Nerd Font"; + ui_font_size = 16; + vim_mode = true; + ssh_connections = [ + { + host = "tahani"; + projects = [ + { + paths = [ + "/home/cschmatzler/Projects/Personal/shnosh" + ]; + } + ]; + } + ]; + format_on_save = "off"; + buffer_font_features = { + calt = 0; + }; + inlay_hints = { + enabled = true; + show_value_hints = true; + show_type_hints = true; + show_parameter_hints = true; + show_other_hints = true; + show_background = false; + edit_debounce_ms = 700; + scroll_debounce_ms = 50; + toggle_on_modifiers_press = { + control = false; + alt = false; + shift = false; + platform = false; + function = false; + }; + }; + telemetry = { + diagnostics = false; + metrics = false; + }; + }; + }; +} diff --git a/modules/home/default.nix b/modules/home/default.nix index a5304f7..7ae341a 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -12,8 +12,8 @@ ./fish.nix ./fzf.nix ./git.nix - ./jjui.nix - ./jujutsu.nix + + ./mise.nix ./neovim ./opencode.nix diff --git a/modules/home/git.nix b/modules/home/git.nix index 88c1fe5..93471ad 100644 --- a/modules/home/git.nix +++ b/modules/home/git.nix @@ -5,6 +5,7 @@ in { enable = true; ignores = ["*.swp"]; userName = name; + userEmail = "christoph@schmatzler.com"; lfs = { enable = true; }; @@ -13,10 +14,19 @@ in { core = { editor = "vim"; autocrlf = "input"; + pager = "delta"; }; # commit.gpgsign = true; pull.rebase = true; rebase.autoStash = true; + interactive.diffFilter = "delta --color-only"; + delta = { + navigate = true; + line-numbers = true; + syntax-theme = "GitHub"; + side-by-side = true; + pager = "less -FRX"; + }; }; }; diff --git a/modules/home/jjui.nix b/modules/home/jjui.nix deleted file mode 100644 index 056e1fc..0000000 --- a/modules/home/jjui.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.jjui = { - enable = true; - }; -} diff --git a/modules/home/jujutsu.nix b/modules/home/jujutsu.nix deleted file mode 100644 index 8d3e8b2..0000000 --- a/modules/home/jujutsu.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - programs.jujutsu = { - enable = true; - settings = { - user = { - name = "Christoph Schmatzler"; - email = "christoph@schmatzler.com"; - }; - diff = { - tool = "delta"; - }; - ui = { - default-command = "status"; - diff-formatter = ":git"; - pager = ["delta" "--pager" "less -FRX"]; - }; - }; - }; -} diff --git a/modules/home/neovim/mappings.nix b/modules/home/neovim/mappings.nix index 9550a5c..c1027f2 100644 --- a/modules/home/neovim/mappings.nix +++ b/modules/home/neovim/mappings.nix @@ -94,16 +94,7 @@ options.desc = "Symbols (LSP, buffer)"; } # g - git - { - mode = "n"; - key = "gg"; - action.__raw = '' - function() - require('toggleterm.terminal').Terminal:new({ cmd = 'jjui', direction = 'float' }):toggle() - end - ''; - options.desc = "jjui"; - } + # l - lsp/formatter { mode = "n"; diff --git a/modules/home/starship.nix b/modules/home/starship.nix index 9de23d0..d23821b 100644 --- a/modules/home/starship.nix +++ b/modules/home/starship.nix @@ -5,7 +5,7 @@ settings = { add_newline = true; command_timeout = 200; - format = "[$directory$\{custom.jj}]($style)$character"; + format = "[$directory$git_commit$git_branch$git_status]($style)$character"; character = { error_symbol = "[✗ ](bold #e64553)"; success_symbol = "[❯](bold #40a02b)[❯](bold #df8e1d)[❯](bold #dc8a78)"; @@ -16,29 +16,18 @@ repo_root_style = "bold cyan"; repo_root_format = "[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "; }; - custom.jj = { - command = '' - jj log --revisions @ --no-graph --ignore-working-copy --color always --limit 1 --template ' - separate(" ", - change_id.shortest(4), - bookmarks, - "|", - concat( - if(conflict, "💥"), - if(divergent, "🚧"), - if(hidden, "👻"), - if(immutable, "🔒"), - ), - raw_escape_sequence("\x1b[1;32m") ++ if(empty, "(empty)"), - raw_escape_sequence("\x1b[1;32m") ++ coalesce( - truncate_end(29, description.first_line(), "…"), - "(no description set)", - ) ++ raw_escape_sequence("\x1b[0m"), - ) - ' - ''; - when = "jj --ignore-working-copy root"; - symbol = "🥋"; + git_commit = { + commit_hash_length = 4; + only_detached = false; + tag_disabled = true; + format = "[$hash]($style) "; + }; + git_branch = { + format = "[$branch]($style) "; + symbol = ""; + }; + git_status = { + format = "| [$all_status$ahead_behind]($style) "; }; }; }; diff --git a/modules/nixos/home/default.nix b/modules/nixos/home/default.nix index 7da3c4a..630ffef 100644 --- a/modules/nixos/home/default.nix +++ b/modules/nixos/home/default.nix @@ -1,8 +1,4 @@ {pkgs, ...}: { - imports = [ - ./zellij.nix - ]; - home = { packages = pkgs.callPackage ../packages.nix {}; }; diff --git a/modules/nixos/home/zellij.nix b/modules/nixos/home/zellij.nix deleted file mode 100644 index 94f3bbb..0000000 --- a/modules/nixos/home/zellij.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.zellij = { - enableFishIntegration = true; - }; -} diff --git a/modules/packages.nix b/modules/packages.nix index 57b8756..efa4110 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -2,9 +2,9 @@ with pkgs; [ (callPackage ./bin/open-project.nix {}) age + amp-cli alejandra ast-grep - codex delta devenv dig @@ -21,6 +21,7 @@ with pkgs; [ hyperfine jq killall + lsof nurl openssh