vivid: add nushell integration

This commit is contained in:
Francesco Noacco 2026-02-07 14:21:07 +01:00 committed by Austin Horstman
parent 42c607ecb4
commit afaa85cf32

View file

@ -17,8 +17,11 @@ let
mkBashIntegrationOption
mkZshIntegrationOption
mkFishIntegrationOption
mkNushellIntegrationOption
;
inherit (lib.hm.nushell) mkNushellInline;
cfg = config.programs.vivid;
yamlFormat = pkgs.formats.yaml { };
in
@ -35,6 +38,7 @@ in
enableBashIntegration = mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkZshIntegrationOption { inherit config; };
enableFishIntegration = mkFishIntegrationOption { inherit config; };
enableNushellIntegration = mkNushellIntegrationOption { inherit config; };
colorMode = mkOption {
type =
@ -160,5 +164,9 @@ in
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
set -gx LS_COLORS "$(${vividCommand})"
'';
programs.nushell.environmentVariables = mkIf cfg.enableNushellIntegration {
LS_COLORS = mkNushellInline vividCommand;
};
};
}