diff --git a/modules/programs/zoxide.nix b/modules/programs/zoxide.nix index 3dcbbd67b..e412d5dfe 100644 --- a/modules/programs/zoxide.nix +++ b/modules/programs/zoxide.nix @@ -63,6 +63,14 @@ in { Whether to enable Nushell integration. ''; }; + + enableXonshIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Xonsh integration. + ''; + }; }; config = mkIf cfg.enable { @@ -93,5 +101,9 @@ in { source ${config.xdg.cacheHome}/zoxide/init.nu ''; }; + + programs.xonsh.xonshrc = mkIf cfg.enableXonshIntegration '' + execx($(${cfg.package}/bin/zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide') + ''; }; }