1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-30 15:09:46 +01:00

starship: add xonsh integration

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

View file

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