starship: add xonsh integration

This commit is contained in:
paki23 2024-05-31 00:17:13 +02:00
parent 783da1d836
commit 7c60585f2e
No known key found for this signature in database
GPG key ID: 13160FFB4CEB03F2

View file

@ -74,6 +74,10 @@ in {
default = true; default = true;
}; };
enableXonshIntegration = mkEnableOption "Xonsh integration" // {
default = true;
};
enableNushellIntegration = mkEnableOption "Nushell integration" // { enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true; default = true;
}; };
@ -124,6 +128,11 @@ in {
end end
''; '';
programs.xonsh.xonshrc = mkIf cfg.enableXonshIntegration ''
if $TERM != "dumb":
execx($(${starshipCmd} init xonsh))
'';
programs.nushell = mkIf cfg.enableNushellIntegration { programs.nushell = mkIf cfg.enableNushellIntegration {
# Unfortunately nushell doesn't allow conditionally sourcing nor # Unfortunately nushell doesn't allow conditionally sourcing nor
# conditionally setting (global) environment variables, which is why the # conditionally setting (global) environment variables, which is why the