From 19256c4539b26074301cc1e28ee4844cd7e54ac1 Mon Sep 17 00:00:00 2001 From: Sophie Forrest Date: Wed, 10 Apr 2024 17:36:06 +1200 Subject: [PATCH] feat(home-manager): init gitui module (#98) --- _sources/generated.json | 20 ++++++++++++++++++++ _sources/generated.nix | 12 ++++++++++++ modules/home-manager/gitui.nix | 20 ++++++++++++++++++++ nvfetcher.toml | 4 ++++ test.nix | 1 + 5 files changed, 57 insertions(+) create mode 100644 modules/home-manager/gitui.nix diff --git a/_sources/generated.json b/_sources/generated.json index c09aded..9773d80 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -119,6 +119,26 @@ }, "version": "0ce27b518e8ead555dec34dd8be3df5bd75cff8e" }, + "gitui": { + "cargoLocks": null, + "date": "2023-11-13", + "extract": null, + "name": "gitui", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "catppuccin", + "repo": "gitui", + "rev": "39978362b2c88b636cacd55b65d2f05c45a47eb9", + "sha256": "sha256-kWaHQ1+uoasT8zXxOxkur+QgZu1wLsOOrP/TL+6cfII=", + "type": "github" + }, + "version": "39978362b2c88b636cacd55b65d2f05c45a47eb9" + }, "glamour": { "cargoLocks": null, "date": "2024-04-02", diff --git a/_sources/generated.nix b/_sources/generated.nix index a9a8a0e..546958a 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -73,6 +73,18 @@ }; date = "2023-11-02"; }; + gitui = { + pname = "gitui"; + version = "39978362b2c88b636cacd55b65d2f05c45a47eb9"; + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "gitui"; + rev = "39978362b2c88b636cacd55b65d2f05c45a47eb9"; + fetchSubmodules = false; + sha256 = "sha256-kWaHQ1+uoasT8zXxOxkur+QgZu1wLsOOrP/TL+6cfII="; + }; + date = "2023-11-13"; + }; glamour = { pname = "glamour"; version = "66d7b09325af67b1c5cdb063343e829c04ad7d5f"; diff --git a/modules/home-manager/gitui.nix b/modules/home-manager/gitui.nix new file mode 100644 index 0000000..29fc5c4 --- /dev/null +++ b/modules/home-manager/gitui.nix @@ -0,0 +1,20 @@ +{ config +, lib +, sources +, ... +}: +let + cfg = config.programs.gitui.catppuccin; + enable = cfg.enable && config.programs.gitui.enable; +in +{ + options.programs.gitui.catppuccin = + lib.ctp.mkCatppuccinOpt "gitui"; + + config = lib.mkIf enable { + programs.gitui.theme = builtins.path { + name = "${cfg.flavour}.ron"; + path = "${sources.gitui}/theme/${cfg.flavour}.ron"; + }; + }; +} diff --git a/nvfetcher.toml b/nvfetcher.toml index e7d9a63..238932f 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -22,6 +22,10 @@ fetch.github = "catppuccin/delta" src.git = "https://github.com/catppuccin/fish.git" fetch.github = "catppuccin/fish" +[gitui] +src.git = "https://github.com/catppuccin/gitui.git" +fetch.github = "catppuccin/gitui" + [glamour] src.git = "https://github.com/catppuccin/glamour.git" fetch.github = "catppuccin/glamour" diff --git a/test.nix b/test.nix index 4bb7fd6..bb34691 100644 --- a/test.nix +++ b/test.nix @@ -61,6 +61,7 @@ in fish = ctpEnable; git.enable = true; # Required for delta git.delta = ctpEnable; + gitui = ctpEnable; glamour.catppuccin.enable = true; helix = ctpEnable; home-manager.enable = false;