Compare commits
8 commits
e90e1138ea
...
af652656a4
| Author | SHA1 | Date | |
|---|---|---|---|
| af652656a4 | |||
| 67b7baed5d | |||
| 75b6a059bc | |||
| 7ecdd7b5f0 | |||
| 7aa1196ad4 | |||
| 7fcc80ac8a | |||
| 4553f1a7d4 | |||
| ac90f1604d |
4 changed files with 73 additions and 49 deletions
36
flake.lock
generated
36
flake.lock
generated
|
|
@ -14,11 +14,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760836749,
|
"lastModified": 1754433428,
|
||||||
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
|
"narHash": "sha256-NA/FT2hVhKDftbHSwVnoRTFhes62+7dxZbxj5Gxvghs=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "2f0f812f69f3eb4140157fe15e12739adf82e32a",
|
"rev": "9edb1787864c4f59ae5074ad498b6272b3ec308d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -73,11 +73,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760948891,
|
"lastModified": 1759362264,
|
||||||
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
|
"narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
|
"rev": "758cf7296bee11f1706a574c77d072b8a7baa881",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -117,11 +117,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760663237,
|
"lastModified": 1758108966,
|
||||||
"narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=",
|
"narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37",
|
"rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -159,11 +159,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760929667,
|
"lastModified": 1759337100,
|
||||||
"narHash": "sha256-nZh6uvc71nVNaf/y+wesnjwsmJ6IZZUnP2EzpZe48To=",
|
"narHash": "sha256-CcT3QvZ74NGfM+lSOILcCEeU+SnqXRvl1XCRHenZ0Us=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "189c21cf879669008ccf06e78a553f17e88d8ef0",
|
"rev": "004753ae6b04c4b18aa07192c1106800aaacf6c3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -175,11 +175,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760878510,
|
"lastModified": 1759422813,
|
||||||
"narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=",
|
"narHash": "sha256-WNkZqscW/dPLK5NMKH/jCkYMaVm/3KWgPmKMq65IXxk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67",
|
"rev": "2a7c84e1e740f004e0fe5c2577a63d1e659a496c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -200,11 +200,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759781536,
|
"lastModified": 1753980880,
|
||||||
"narHash": "sha256-v/X5gKmgVoGtu5elYyUu2w037PyWVhrqnWzXkLJ9xnY=",
|
"narHash": "sha256-aj1pbYxL6N+XFqBHjB4B1QP0bnKRcg1AfpgT5zUFsW8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "c30a53a5947bcc874b3f8842e6fe5c34bc81d8dd",
|
"rev": "16db3e61da7606984a05b4dfc33cd1d26d22fb22",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.home.delta;
|
cfg = config.my.home.delta;
|
||||||
|
|
||||||
|
configFormat = pkgs.formats.gitIni { };
|
||||||
|
configPath = "${config.xdg.configHome}/delta/config";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.home.delta = with lib; {
|
options.my.home.delta = with lib; {
|
||||||
|
|
@ -18,14 +21,28 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.delta = {
|
assertions = [
|
||||||
enable = true;
|
{
|
||||||
|
# For its configuration
|
||||||
|
assertion = cfg.enable -> cfg.git.enable;
|
||||||
|
message = ''
|
||||||
|
`config.my.home.delta` must enable `config.my.home.delta.git` to be
|
||||||
|
properly configured.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
assertion = cfg.enable -> config.programs.git.enable;
|
||||||
|
message = ''
|
||||||
|
`config.my.home.delta` relies on `config.programs.git` to be
|
||||||
|
enabled.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
inherit (cfg) package;
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
enableGitIntegration = cfg.git.enable;
|
xdg.configFile."delta/config".source = configFormat.generate "delta-config" {
|
||||||
|
delta = {
|
||||||
options = {
|
|
||||||
features = "diff-highlight decorations";
|
features = "diff-highlight decorations";
|
||||||
|
|
||||||
# Less jarring style for `diff-highlight` emulation
|
# Less jarring style for `diff-highlight` emulation
|
||||||
|
|
@ -50,6 +67,19 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.git = lib.mkIf cfg.git.enable {
|
||||||
|
delta = {
|
||||||
|
enable = true;
|
||||||
|
inherit (cfg) package;
|
||||||
|
};
|
||||||
|
|
||||||
|
includes = [
|
||||||
|
{
|
||||||
|
path = configPath;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
programs.jujutsu = lib.mkIf cfg.jujutsu.enable {
|
programs.jujutsu = lib.mkIf cfg.jujutsu.enable {
|
||||||
settings = {
|
settings = {
|
||||||
merge-tools = {
|
merge-tools = {
|
||||||
|
|
@ -63,8 +93,7 @@ in
|
||||||
# Delta expects a `git diff` input
|
# Delta expects a `git diff` input
|
||||||
diff-formatter = ":git";
|
diff-formatter = ":git";
|
||||||
|
|
||||||
# `finalPackage` automatically applied `--config` if necessary
|
pager = [ (lib.getExe cfg.package) "--config=${configPath}" ];
|
||||||
pager = [ config.programs.delta.finalPackage ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -21,19 +21,13 @@ in
|
||||||
config.programs.git = lib.mkIf cfg.enable {
|
config.programs.git = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
# Who am I?
|
||||||
|
userEmail = mkMailAddress "bruno" "belanyi.fr";
|
||||||
|
userName = "Bruno BELANYI";
|
||||||
|
|
||||||
inherit (cfg) package;
|
inherit (cfg) package;
|
||||||
|
|
||||||
lfs.enable = true;
|
aliases = {
|
||||||
|
|
||||||
# There's more
|
|
||||||
settings = {
|
|
||||||
# Who am I?
|
|
||||||
user = {
|
|
||||||
email = mkMailAddress "bruno" "belanyi.fr";
|
|
||||||
name = "Bruno BELANYI";
|
|
||||||
};
|
|
||||||
|
|
||||||
alias = {
|
|
||||||
git = "!git";
|
git = "!git";
|
||||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit --topo-order";
|
lol = "log --graph --decorate --pretty=oneline --abbrev-commit --topo-order";
|
||||||
lola = "lol --all";
|
lola = "lol --all";
|
||||||
|
|
@ -46,6 +40,10 @@ in
|
||||||
root = "git rev-parse --show-toplevel";
|
root = "git rev-parse --show-toplevel";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
lfs.enable = true;
|
||||||
|
|
||||||
|
# There's more
|
||||||
|
extraConfig = {
|
||||||
# Makes it a bit more readable
|
# Makes it a bit more readable
|
||||||
blame = {
|
blame = {
|
||||||
coloring = "repeatedLines";
|
coloring = "repeatedLines";
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,6 @@ set updatetime=250
|
||||||
" Disable all mouse integrations
|
" Disable all mouse integrations
|
||||||
set mouse=
|
set mouse=
|
||||||
|
|
||||||
" Set dark mode by default
|
|
||||||
set background=dark
|
|
||||||
|
|
||||||
" Setup some overrides for gruvbox
|
" Setup some overrides for gruvbox
|
||||||
lua << EOF
|
lua << EOF
|
||||||
local gruvbox = require("gruvbox")
|
local gruvbox = require("gruvbox")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue