{ pkgs, lib, getPkgs, config, mkWrappers, ... }: let pal = config.rice.palette.hex; ui = config.rice.roles pal; inherit (mkWrappers pkgs) wrap wrapXdg; lazygitConfig = pkgs.writeText "lazygit-config.yml" '' gui: theme: activeBorderColor: - "${ui.highlight}" - bold inactiveBorderColor: - "${ui.muted}" searchingActiveBorderColor: - "${ui.accent}" - bold optionsTextColor: - "${ui.primary}" selectedLineBgColor: - "${ui.surface}" selectedRangeBgColor: - "${ui.surface}" cherryPickedCommitBgColor: - "${ui.accent}" cherryPickedCommitFgColor: - "${ui.bg}" unstagedChangesColor: - "${ui.error}" defaultFgColor: - "${ui.fg}" ''; zellijConfig = pkgs.writeTextDir "zellij-config.kdl" '' themes { nix-rice { fg "${ui.fg}" bg "${ui.surface}" black "${pal.normal.black}" red "${pal.normal.red}" green "${pal.normal.green}" yellow "${pal.normal.yellow}" blue "${pal.normal.blue}" magenta "${pal.normal.magenta}" cyan "${pal.normal.cyan}" white "${pal.normal.white}" orange "${ui.highlight}" } } theme "nix-rice" ''; btopConfigDir = pkgs.runCommand "btop-xdg" { } '' mkdir -p $out/btop cp ${pkgs.writeText "btop.conf" '' color_theme = "TTY" update_ms = 100 ''} $out/btop/btop.conf ''; in { environment.systemPackages = getPkgs { inherit (pkgs) curl eza gitMinimal ripgrep fd ouch bat ; lazygit = wrap { name = "lazygit"; pkg = pkgs.lazygit; args = [ "--use-config-file=${lazygitConfig}" ]; }; zellij = wrap { name = "zellij"; pkg = pkgs.zellij; args = [ "--config-dir ${zellijConfig}" ]; envs = { SHELL = "${config.users.defaultUserShell}/bin/nu"; }; }; btop = wrapXdg "btop" pkgs.btop btopConfigDir; }; environment.variables.BAT_THEME = "ansi"; }