Compare commits

..

4 commits

Author SHA1 Message Date
Bruno BELANYI 925b872305 home: git: switch to 'delta'
All checks were successful
continuous-integration/drone/push Build is passing
Now that my issue with it has been resolved [1], let's switch to the
more mature tool.

This also solves a small issue that I had with `diff-highlight` which is
that non-highlighted text should not be boldened.

[1]: https://github.com/dandavison/delta/issues/544
2021-11-29 17:50:07 +01:00
Bruno BELANYI 2b5fedadd2 home: git: use diff-highlight in interactive diffs
Now even `git log -p` and `git add -p` can use the more readable diffs.
2021-11-29 13:13:48 +01:00
Bruno BELANYI c7c38865e9 modules: system: nix: don't change daemon niceness
This option doesn't really work the way it should anyway [1].

This reverts commit cbf6ea9ac9.

[1]: https://github.com/NixOS/nixpkgs/pull/138741
2021-11-23 18:53:11 +01:00
Bruno BELANYI 5150bad300 flake: agenix has renamed its branch to 'main' 2021-11-23 17:08:46 +01:00
4 changed files with 32 additions and 25 deletions

View file

@ -7,16 +7,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1634404028, "lastModified": 1637625975,
"narHash": "sha256-JyP2Y6JCCYvUcVz7CXX5pXUfTGTU4GX51Yza82BgMfk=", "narHash": "sha256-ByDgmhpLykhAVeaFggjqoSRdl2OzTDODnxjPuu97fL4=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "53aa91b4170da35a96fab1577c9a34bc0da44e27", "rev": "a0e9ca505c82e762d39e9477a428b537a0aab022",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "ryantm", "owner": "ryantm",
"ref": "master", "ref": "main",
"repo": "agenix", "repo": "agenix",
"type": "github" "type": "github"
} }

View file

@ -5,7 +5,7 @@
type = "github"; type = "github";
owner = "ryantm"; owner = "ryantm";
repo = "agenix"; repo = "agenix";
ref = "master"; ref = "main";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
}; };

View file

@ -39,6 +39,33 @@ in
lfs.enable = true; lfs.enable = true;
delta = {
enable = true;
options = {
features = "diff-highlight decorations";
# Less jarring style for `diff-highlight` emulation
diff-highlight = {
minus-style = "red";
minus-non-emph-style = "red";
minus-emph-style = "bold red 52";
plus-style = "green";
plus-non-emph-style = "green";
plus-emph-style = "bold green 22";
whitespace-error-style = "reverse red";
};
# Personal preference for easier reading
decorations = {
keep-plus-minus-markers = true;
paging = "always";
};
};
};
# There's more # There's more
extraConfig = { extraConfig = {
# Makes it a bit more readable # Makes it a bit more readable
@ -72,13 +99,6 @@ in
whitespace = "red reverse"; whitespace = "red reverse";
}; };
"color.diff-highlight" = {
oldNormal = "red bold";
oldHighlight = "red bold 52";
newNormal = "green bold";
newHighlight = "green bold 22";
};
commit = { commit = {
# Show my changes when writing the message # Show my changes when writing the message
verbose = true; verbose = true;
@ -99,16 +119,6 @@ in
defaultBranch = "main"; defaultBranch = "main";
}; };
pager =
let
diff-highlight = "${pkgs.gitAndTools.gitFull}/share/git/contrib/diff-highlight/diff-highlight";
in
{
diff = "${diff-highlight} | less";
log = "${diff-highlight} | less";
show = "${diff-highlight} | less";
};
pull = { pull = {
# Avoid useless merge commits # Avoid useless merge commits
rebase = true; rebase = true;

View file

@ -18,9 +18,6 @@ in
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
# Keep my system responsive during builds
daemonNiceLevel = 19;
}; };
} }