]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/jujutsu.nix
use/replace(drill -> q): q has much more features
[julm/julm-nix.git] / home-manager / profiles / jujutsu.nix
1 {
2 config,
3 lib,
4 pkgs,
5 ...
6 }:
7 {
8 home.packages = lib.mkIf config.programs.git.enable [
9 pkgs.watchman
10 pkgs.gg-jj
11 pkgs.jjui
12 pkgs.jujutsu
13 pkgs.lazyjj
14 ];
15 xdg.configFile."jj".source = jujutsu/jj;
16 xdg.configFile."jjui".source = jujutsu/jjui;
17 programs.bash = lib.mkIf config.programs.git.enable {
18 shellAliases = {
19 je = "jj-edit";
20 jer = "jj-edit-review";
21 };
22 initExtra = ''
23 jj-edit () { local revs=$1; shift; $EDITOR $(jj diff -r "$revs" --name-only "$@"); }
24 jj-edit-review () { local revs=$1; shift; $EDITOR $(jj diff -r "review($revs)" --name-only "$@"); }
25 '';
26 };
27 }