diff options
| author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-10-17 14:48:18 +0200 |
|---|---|---|
| committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-10-17 14:48:18 +0200 |
| commit | 0b35db5b683065569b0ea9282e40a7b7e1530324 (patch) | |
| tree | e412d462a2392de9e126a9fa7ada8345baff2ba4 /jj.nix | |
| parent | 020629e8c51bd0d3fa3eacc49ef35817a1fc225b (diff) | |
| download | home-manager-0b35db5b683065569b0ea9282e40a7b7e1530324.tar.gz home-manager-0b35db5b683065569b0ea9282e40a7b7e1530324.tar.bz2 home-manager-0b35db5b683065569b0ea9282e40a7b7e1530324.zip | |
Add jj configuration
Diffstat (limited to 'jj.nix')
| -rw-r--r-- | jj.nix | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -0,0 +1,36 @@ +{ + pkgs, + inputs, + git, + ... +}: let + tomlFormat = pkgs.formats.toml {}; +in { + xdg.configFile."jj/config.toml".source = tomlFormat.generate "config.toml" { + user = { + name = git.name; + email = git.email; + }; + ui = { + diff-formatter = ":git"; + pager = ":builtin"; + }; + aliases = { + wk = ["log" "-r" "trunk()::@ | @::"]; + gp = ["git" "push" "--allow-new"]; + gf = ["git" "fetch"]; + tracked = ["bookmark" "list" "-t" "-T" ''if(self.tracked(), if(self.name() != "main", self.name()++"\n"))'']; + untracked = ["bookmark" "list" "-T" ''if(!self.tracked(), if(self.name() != "main", self.name()++"\n"))'']; + e = ["edit"]; + track = ["util" "exec" "--" "bash" "-c" "jj bookmark set $(jj log -r @ -T 'self.change_id()' --no-graph)"]; + tug = ["bookmark" "move" "--from" "heads(::@- & bookmarks())" "--to" "@-"]; + nm = ["new" "-r" "trunk()"]; + }; + templates = { + log = "builtin_log_compact"; + }; + template-aliases = { + "commit_timestamp(commit)" = "commit.author().timestamp()"; + }; + }; +} |
