Compare commits
14 commits
7ce81b19c7
...
2944a7c4da
| Author | SHA1 | Date | |
|---|---|---|---|
| 2944a7c4da | |||
| 2c9b37881a | |||
| 3a4031adff | |||
| e9833bdc92 | |||
| 441bd25f97 | |||
| 87238d099e | |||
| 6b2fab2226 | |||
| 886212526a | |||
| 7b987b9475 | |||
| c74015c6ea | |||
| c6176c4d92 | |||
| 125764fa5a | |||
| 71f7cf0790 | |||
| 41c506749e |
9 changed files with 184 additions and 24 deletions
24
flake.lock
generated
24
flake.lock
generated
|
|
@ -14,11 +14,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760836749,
|
||||
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
|
||||
"lastModified": 1761656077,
|
||||
"narHash": "sha256-lsNWuj4Z+pE7s0bd2OKicOFq9bK86JE0ZGeKJbNqb94=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "2f0f812f69f3eb4140157fe15e12739adf82e32a",
|
||||
"rev": "9ba0d85de3eaa7afeab493fed622008b6e4924f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -73,11 +73,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760948891,
|
||||
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
|
||||
"lastModified": 1762040540,
|
||||
"narHash": "sha256-z5PlZ47j50VNF3R+IMS9LmzI5fYRGY/Z5O5tol1c9I4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
|
||||
"rev": "0010412d62a25d959151790968765a70c436598b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -159,11 +159,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761530345,
|
||||
"narHash": "sha256-+9+YCK9Lh6GThkXu/8JTxMFUnImIdZpb8ElUh6/F5Y8=",
|
||||
"lastModified": 1762435363,
|
||||
"narHash": "sha256-BTmHXtuuwVO1dRs6jPHcHCoO6+A7G3+GzrgeluiSkww=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "bbaeb9f1c29e79bb1653b32c3d73244cdf4bd888",
|
||||
"rev": "432bc8a5da66638b5f139588efd6c4bd327e4cdc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -175,11 +175,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1761373498,
|
||||
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
|
||||
"lastModified": 1762111121,
|
||||
"narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
|
||||
"rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, ... }:
|
||||
{ self, lib, ... }:
|
||||
let
|
||||
default-overlays = import "${self}/overlays";
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ let
|
|||
|
||||
# Expose my custom packages
|
||||
pkgs = _final: prev: {
|
||||
ambroisie = prev.recurseIntoAttrs (import "${self}/pkgs" { pkgs = prev; });
|
||||
ambroisie = lib.recurseIntoAttrs (import "${self}/pkgs" { pkgs = prev; });
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
./gtk
|
||||
./htop
|
||||
./jq
|
||||
./jujutsu
|
||||
./keyboard
|
||||
./mail
|
||||
./mpv
|
||||
|
|
|
|||
|
|
@ -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,27 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
# `jj log -p` does not use `delta`
|
||||
# https://github.com/jj-vcs/jj/issues/4142
|
||||
# FIXME: use `enableJujutsuIntegration` (https://github.com/nix-community/home-manager/pull/8070)
|
||||
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) ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
135
modules/home/jujutsu/default.nix
Normal file
135
modules/home/jujutsu/default.nix
Normal 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 = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
-- Use GLSL filetype for common shader file extensions
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
frag = "glsl",
|
||||
vert = "glsl",
|
||||
},
|
||||
})
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue