From a3e55e6533a7a815788e24d3d8b1bf6f85d5b592 Mon Sep 17 00:00:00 2001 From: Anomalocaridid <29845794+Anomalocaridid@users.noreply.github.com> Date: Sun, 7 Apr 2024 05:15:18 -0400 Subject: [PATCH] feat(home-manager): init delta module (#82) --- _sources/generated.json | 20 ++++++++++++++++++++ _sources/generated.nix | 12 ++++++++++++ modules/home-manager/delta.nix | 24 ++++++++++++++++++++++++ nvfetcher.toml | 4 ++++ test.nix | 2 ++ 5 files changed, 62 insertions(+) create mode 100644 modules/home-manager/delta.nix diff --git a/_sources/generated.json b/_sources/generated.json index a795536..be20eb9 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -79,6 +79,26 @@ }, "version": "c6469190f2ecf25f017d6120bf4e050e6b1d17af" }, + "delta": { + "cargoLocks": null, + "date": "2024-03-23", + "extract": null, + "name": "delta", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "catppuccin", + "repo": "delta", + "rev": "765eb17d0268bf07c20ca439771153f8bc79444f", + "sha256": "sha256-GA0n9obZlD0Y2rAbGMjcdJ5I0ij1NEPBFC7rv7J49QI=", + "type": "github" + }, + "version": "765eb17d0268bf07c20ca439771153f8bc79444f" + }, "fish": { "cargoLocks": null, "date": "2023-11-02", diff --git a/_sources/generated.nix b/_sources/generated.nix index b960d2c..6f67188 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -49,6 +49,18 @@ }; date = "2023-10-07"; }; + delta = { + pname = "delta"; + version = "765eb17d0268bf07c20ca439771153f8bc79444f"; + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "delta"; + rev = "765eb17d0268bf07c20ca439771153f8bc79444f"; + fetchSubmodules = false; + sha256 = "sha256-GA0n9obZlD0Y2rAbGMjcdJ5I0ij1NEPBFC7rv7J49QI="; + }; + date = "2024-03-23"; + }; fish = { pname = "fish"; version = "0ce27b518e8ead555dec34dd8be3df5bd75cff8e"; diff --git a/modules/home-manager/delta.nix b/modules/home-manager/delta.nix new file mode 100644 index 0000000..ad9091d --- /dev/null +++ b/modules/home-manager/delta.nix @@ -0,0 +1,24 @@ +{ config +, lib +, sources +, ... +}: +let + cfg = config.programs.git.delta.catppuccin; + enable = cfg.enable && config.programs.git.delta.enable; +in +{ + options.programs.git.delta.catppuccin = + lib.ctp.mkCatppuccinOpt "catppuccin"; + + config = lib.mkIf enable { + programs.git = { + includes = [ + { + path = "${sources.delta}/catppuccin.gitconfig"; + } + ]; + delta.options.features = "catppuccin-${config.catppuccin.flavour}"; + }; + }; +} diff --git a/nvfetcher.toml b/nvfetcher.toml index b5007bc..1bbee7b 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -14,6 +14,10 @@ fetch.github = "catppuccin/bottom" src.git = "https://github.com/catppuccin/btop.git" fetch.github = "catppuccin/btop" +[delta] +src.git = "https://github.com/catppuccin/delta.git" +fetch.github = "catppuccin/delta" + [fish] src.git = "https://github.com/catppuccin/fish.git" fetch.github = "catppuccin/fish" diff --git a/test.nix b/test.nix index a9e5916..3b01f97 100644 --- a/test.nix +++ b/test.nix @@ -59,6 +59,8 @@ in bottom = ctpEnable; btop = ctpEnable; fish = ctpEnable; + git.enable = true; # Required for delta + git.delta = ctpEnable; glamour.catppuccin.enable = true; helix = ctpEnable; home-manager.enable = false;