1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 21:49:48 +01:00

eza: add xonsh integration

This commit is contained in:
paki23 2024-05-31 00:07:18 +02:00
parent 47a2dd4554
commit b964ab7f39
No known key found for this signature in database
GPG key ID: 13160FFB4CEB03F2

View file

@ -37,6 +37,10 @@ with lib;
default = true;
};
enableXonshIntegration = mkEnableOption "Xonsh integration" // {
default = true;
};
enableNushellIntegration = mkEnableOption "Nushell integration";
extraOptions = mkOption {
@ -97,6 +101,18 @@ with lib;
programs.ion.shellAliases = optionsAlias
// optionalAttrs cfg.enableIonIntegration aliases;
programs.xonsh.shellAliases = {
eza = [ "eza" ] ++ optional cfg.icons "--icons"
++ optional cfg.git "--git" ++ cfg.extraOptions;
} // optionalAttrs cfg.enableXonshIntegration
(builtins.mapAttrs (_name: value: lib.mkDefault value) {
ls = [ "eza" ];
ll = [ "eza" "-l" ];
la = [ "eza" "-a" ];
lt = [ "eza" "--tree" ];
lla = [ "eza" "-la" ];
});
programs.nushell.shellAliases = optionsAlias
// optionalAttrs cfg.enableNushellIntegration aliases;
};