Add gruvbox theme for yazi

This commit is contained in:
Fern Garden 2025-07-12 15:37:22 +08:00
parent f89b492dc9
commit 8907f2f16a
3 changed files with 32 additions and 2 deletions

View file

@ -43,6 +43,7 @@ with inputs.nixpkgs.lib; {
fluffychat = (import nixpkgs-pr-fluffychat {inherit system;}).fluffychat;
feishin = (import nixpkgs-pr-feishin {inherit system;}).feishin;
webone = pkgs.callPackage ./packages/webone {};
yazi-flavour-gruvbox-dark = pkgs.callPackage ./packages/yazi-flavour-gruvbox {};
};
in
{

View file

@ -0,0 +1,21 @@
{
pkgs,
fetchFromGitHub,
}: let
flavor = "gruvbox-dark";
in
pkgs.stdenv.mkDerivation {
pname = "yazi-flavor-${flavor}";
version = "2025.04.24";
src = fetchFromGitHub {
owner = "bennyyip";
repo = "${flavor}.yazi";
rev = "91fdfa70f6d593934e62aba1e449f4ec3d3ccc90";
hash = "sha256-RWqyAdETD/EkDVGcnBPiMcw1mSd78Aayky9yoxSsry4=";
};
installPhase = ''
mkdir -p $out
cp $src/* $out/
'';
}

View file

@ -1,5 +1,6 @@
{
nixpkgs,
userPackages,
pkgs,
lib,
hostname,
@ -70,7 +71,7 @@ with lib; {
enable = true;
interactiveShellInit = ''
# set gruvbox theme
theme_gruvbox
theme_gruvbox dark hard
# yazi cd on quit.
function y
@ -217,6 +218,14 @@ with lib; {
};
};
programs.yazi = {
enable = true;
flavors."gruvbox-dark.yazi" = userPackages.yazi-flavour-gruvbox-dark;
settings.theme = {
flavor.dark = "gruvbox-dark";
};
};
environment.systemPackages = with pkgs; [
aria2
btop
@ -226,7 +235,6 @@ with lib; {
rsync
tmux
trash-cli
yazi
];
# Enable avahi hostname resolution.