Compare commits

...

12 commits

Author SHA1 Message Date
e15e495a6d WIP: ADD NOTE FOR FUTURE SELF
Some checks failed
ci/woodpecker/push/check Pipeline failed
2025-10-27 12:36:22 +00:00
275d85db44 home: jujutsu: set 'home.diff-editor'
Otherwise it keeps nagging me with a hint to set it.

I'm not a big fan of this UI, I wish I add something closer to Git's
patch interface.
2025-10-27 12:35:26 +00:00
0211ac1a3e homes: mousqueton: use system jujutsu
They have a custom `jj` with Piper CitC integration.
2025-10-27 12:35:26 +00:00
74a75f5677 homes: bazin: use system jujutsu
They have a custom `jj` with Piper CitC integration.
2025-10-27 12:35:26 +00:00
80c7f287ff home: jujutsu: simplify 'jj jj' alias 2025-10-27 12:35:26 +00:00
c41d3a1086 home: jujutsu: explicitly create 'conf.d'
This is to serve as a reminder of _how_ to add a local configuration
file.
2025-10-27 12:35:26 +00:00
041e974487 home: jj: use verbose draft commit messages 2025-10-27 12:35:26 +00:00
528f27fbe4 home: delta: add 'jujutsu.enable' 2025-10-27 12:35:26 +00:00
0a609e19c0 home: add jujutsu
This is a very basic configuration, still missing most bells and
whistles.
2025-10-27 12:35:26 +00:00
9aad65bd9c home: vim: do not set 'background' explicitly
Rely on the new behaviour from v0.10 which detects it more
intelligently.
2025-10-27 12:35:26 +00:00
f748b2aa97 home: zsh: add 'zsh-completion-sync'
Some checks failed
ci/woodpecker/push/check Pipeline failed
It's gated behind `completionSync.enable`, as it does make
entering/leaving direnv-enabled projects slower (due to the calls to
`compinit`).

This might need a bit more work to avoid multiple `compinit`s at shell
startup, will refine in the future if necessary.
2025-10-27 12:32:35 +00:00
d5d2c761d5 flake: bump inputs 2025-10-27 12:32:35 +00:00
8 changed files with 191 additions and 9 deletions

12
flake.lock generated
View file

@ -159,11 +159,11 @@
]
},
"locked": {
"lastModified": 1760969583,
"narHash": "sha256-vsf5mvR0xxK4GsfLx5bMJAQ4ysdrKymMIifNw+4TP7g=",
"lastModified": 1761530345,
"narHash": "sha256-+9+YCK9Lh6GThkXu/8JTxMFUnImIdZpb8ElUh6/F5Y8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c9d758b500e53db5b74aa02d17dc45b65229e8e9",
"rev": "bbaeb9f1c29e79bb1653b32c3d73244cdf4bd888",
"type": "github"
},
"original": {
@ -175,11 +175,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1760878510,
"narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=",
"lastModified": 1761373498,
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67",
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
"type": "github"
},
"original": {

View file

@ -22,6 +22,10 @@
package = pkgs.emptyDirectory;
};
jujutsu = {
package = pkgs.emptyDirectory;
};
tmux = {
# I use scripts that use the passthrough sequence often on this host
enablePassthrough = true;

View file

@ -25,6 +25,10 @@
package = pkgs.emptyDirectory;
};
jujutsu = {
package = pkgs.emptyDirectory;
};
tmux = {
# I use scripts that use the passthrough sequence often on this host
enablePassthrough = true;

View file

@ -24,6 +24,7 @@
./gtk
./htop
./jq
./jujutsu
./keyboard
./mail
./mpv

View file

@ -11,6 +11,10 @@ in
git = {
enable = my.mkDisableOption "git integration";
};
jujutsu = {
enable = my.mkDisableOption "jujutsu integration";
};
};
config = lib.mkIf cfg.enable {
@ -45,5 +49,26 @@ in
};
};
};
# `jj log -p` does not use `delta`
# https://github.com/jj-vcs/jj/issues/4142
programs.jujutsu = lib.mkIf cfg.jujutsu.enable {
settings = {
merge-tools = {
delta = {
# Errors are signaled with exit codes greater or equal to 2
diff-expected-exit-codes = [ 0 1 ];
};
};
ui = {
# Delta expects a `git diff` input
diff-formatter = ":git";
# `finalPackage` automatically applied `--config` if necessary
pager = [ (lib.getExe config.programs.delta.finalPackage) ];
};
};
};
};
}

View file

@ -0,0 +1,135 @@
{ config, pkgs, lib, ... }:
let
cfg = config.my.home.jujutsu;
inherit (lib.my) mkMailAddress;
in
{
options.my.home.jujutsu = with lib; {
enable = my.mkDisableOption "jujutsu configuration";
package = mkPackageOption pkgs "jujutsu" { };
};
config = lib.mkIf cfg.enable {
assertions = [
{
# For `jj git` commands
assertion = cfg.enable -> config.my.home.git.enable;
message = ''
`config.my.home.jujutsu` relies on `config.my.home.git` being enabled.
'';
}
];
programs.jujutsu = {
enable = true;
inherit (cfg) package;
settings = {
# Who am I?
user = {
name = "Bruno BELANYI";
email = mkMailAddress "bruno" "belanyi.fr";
};
aliases = {
jj = [ ];
# FIXME:
# * still not a big fan of the template
lol = [ "log" "-r" "..@" "-T" "builtin_log_oneline" ];
lola = [ "lol" "-r" "all()" ];
# FIXME: equivalent to `git switch -`
# See https://github.com/jj-vcs/jj/issues/2871
# Might be broken recently https://discord.com/channels/968932220549103686/1380272574709366989/1380432041983606855
# TODO:
# * `pick` (https://github.com/jj-vcs/jj/issues/5446): [ "util" "exec" "--" "bash" "-c" "jj log -p -r \"diff_contains($1)\"" "" ]
# * `root`: `jj workspace root` (barely necessary then)
};
ui = {
# Stop nagging me about it, though I am not a fan of its UI.
diff-editor = ":builtin";
};
# FIXME: git equivalents
# I'd like a better formatted blame (more like delta's?)
# blame = {
# coloring = "repeatedLines";
# markIgnoredLines = true;
# markUnblamables = true;
# };
# FIXME: log colors should probably match git
# FIXME: patience diff?
# FIXME: fetch prune/pruneTags?
# FIXME: pull.rebase=true? Probably true TBH
# FIXME: push.default=simple? Probably true TBH
# FIXME: conflict style? ui.conflict-marker-style=git is diff3, not zdiff3. Default looks fine-ish
# FIXME: from ma_9's config, plus my own stuff
# snapshot = {
# auto-track = "none()";
# };
#
# ui = {
# movement = {
# edit = false;
# };
# };
templates = {
# Equivalent to `commit.verbose = true` in Git
draft_commit_description = "commit_description_verbose(self)";
};
template-aliases = {
"commit_description_verbose(commit)" = ''
concat(
commit_description(commit),
"JJ: ignore-rest\n",
diff.git(),
)
'';
# FIXME: use `diff.summary()` instead? Supported by syntax highlighting
# See https://github.com/jj-vcs/jj/issues/1946#issuecomment-2572986485
# FIXME: tree-sitter grammar isn't in `nvim-treesitter` (https://github.com/kareigu/tree-sitter-jjdescription)
"commit_description(commit)" = ''
concat(
commit.description(), "\n",
"JJ: This commit contains the following changes:\n",
indent("JJ: ", diff.stat(72)),
)
'';
};
"--scope" = [
# Multiple identities
{
"--when" = {
repositories = [ "~/git/EPITA/" ];
};
user = {
name = "Bruno BELANYI";
email = mkMailAddress "bruno.belanyi" "epita.fr";
};
}
{
"--when" = {
repositories = [ "~/git/work/" ];
};
user = {
name = "Bruno BELANYI";
email = mkMailAddress "ambroisie" "google.com";
};
}
];
};
};
# To drop in a `local.toml` configuration, not-versioned
xdg.configFile = {
"jj/conf.d/.keep".text = "";
};
};
}

View file

@ -81,9 +81,6 @@ set updatetime=250
" Disable all mouse integrations
set mouse=
" Set dark mode by default
set background=dark
" Setup some overrides for gruvbox
lua << EOF
local gruvbox = require("gruvbox")

View file

@ -8,6 +8,10 @@ in
launchTmux = mkEnableOption "auto launch tmux at shell start";
completionSync = {
enable = mkEnableOption "zsh-completion-sync plugin";
};
notify = {
enable = mkEnableOption "zsh-done notification";
@ -118,6 +122,18 @@ in
};
}
(lib.mkIf cfg.completionSync.enable {
programs.zsh = {
plugins = [
{
name = "zsh-completion-sync";
file = "share/zsh-completion-sync/zsh-completion-sync.plugin.zsh";
src = pkgs.zsh-completion-sync;
}
];
};
})
(lib.mkIf cfg.notify.enable {
programs.zsh = {
plugins = [