random rice
This commit is contained in:
parent
f080730c99
commit
60613b0a1d
17 changed files with 221 additions and 143 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = "cjriddz@protonmail.com";
|
||||
|
|
@ -26,6 +27,9 @@
|
|||
settings = {
|
||||
core = {
|
||||
fsmonitor = "watchman";
|
||||
watchman = {
|
||||
register-snapshot-trigger = false;
|
||||
};
|
||||
};
|
||||
user = {
|
||||
email = "cjriddz@protonmail.com";
|
||||
|
|
@ -35,7 +39,7 @@
|
|||
username = "iofq";
|
||||
};
|
||||
signing = {
|
||||
behavior = "own";
|
||||
behavior = "drop";
|
||||
backend = "gpg";
|
||||
key = "cjriddz@protonmail.com";
|
||||
};
|
||||
|
|
@ -43,48 +47,63 @@
|
|||
sign-on-push = true;
|
||||
};
|
||||
ui = {
|
||||
default-command = ["log"];
|
||||
default-command = [ "log" ];
|
||||
conflict-marker-style = "git";
|
||||
merge-editor = "vimdiff";
|
||||
diff-editor = "diffview";
|
||||
diff.format = "git";
|
||||
diff-formatter = ":git";
|
||||
paginate = "never";
|
||||
movement = {
|
||||
edit = true;
|
||||
};
|
||||
};
|
||||
merge-tools.vimdiff = {
|
||||
program = "nvim";
|
||||
program = "nvim";
|
||||
};
|
||||
merge-tools.diffview = {
|
||||
program = "sh";
|
||||
edit-args = [
|
||||
"-c"
|
||||
''
|
||||
set -eu
|
||||
rm -f "$right/JJ-INSTRUCTIONS"
|
||||
git -C "$left" init -q
|
||||
git -C "$left" add -A
|
||||
git -C "$left" commit -q -m baseline --allow-empty
|
||||
mv "$left/.git" "$right"
|
||||
git -C "$right" add --intent-to-add -A
|
||||
(cd "$right"; nvim -c "lua vim.g.snacks_indent=false" -c "lua require('lazy').load({plugins = {'diffview.nvim'}})" -c DiffviewOpen)
|
||||
git -C "$right" diff-index --quiet --cached HEAD && { echo "No changes done, aborting split."; exit 1; }
|
||||
git -C "$right" commit -q -m split
|
||||
git -C "$right" restore . # undo changes in modified files
|
||||
git -C "$right" reset . # undo --intent-to-add
|
||||
git -C "$right" clean -q -df # remove untracked files
|
||||
''
|
||||
];
|
||||
program = "sh";
|
||||
edit-args = [
|
||||
"-c"
|
||||
''
|
||||
set -eu
|
||||
rm -f "$right/JJ-INSTRUCTIONS"
|
||||
git -C "$left" init -q
|
||||
git -C "$left" add -A
|
||||
git -C "$left" commit -q -m baseline --allow-empty
|
||||
mv "$left/.git" "$right"
|
||||
git -C "$right" add --intent-to-add -A
|
||||
(cd "$right"; nvim -c "lua vim.g.snacks_indent=false" -c "lua require('lazy').load({plugins = {'diffview.nvim'}})" -c DiffviewOpen)
|
||||
git -C "$right" diff-index --quiet --cached HEAD && { echo "No changes done, aborting split."; exit 1; }
|
||||
git -C "$right" commit -q -m split
|
||||
git -C "$right" restore . # undo changes in modified files
|
||||
git -C "$right" reset . # undo --intent-to-add
|
||||
git -C "$right" clean -q -df # remove untracked files
|
||||
''
|
||||
];
|
||||
};
|
||||
snapshot = {
|
||||
max-new-file-size = "10MiB";
|
||||
};
|
||||
revsets = {
|
||||
log = "ancestors(reachable(@,trunk()..),2) | trunk()";
|
||||
anc = "ancestors(@,10) | trunk()";
|
||||
};
|
||||
aliases = {
|
||||
tug = ["bookmark" "move" "--from" "heads(::@- & bookmarks())" "--to" "@"];
|
||||
tug = [
|
||||
"bookmark"
|
||||
"move"
|
||||
"--from"
|
||||
"heads(::@- & bookmarks())"
|
||||
"--to"
|
||||
"@"
|
||||
];
|
||||
};
|
||||
fix = {
|
||||
tools = {
|
||||
treefmt = {
|
||||
command = [ "treefmt" ];
|
||||
patterns = [ "glob:**/*.nix" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue