From 47a2dd45549bfb7d5afb3f0b8f46d5f4e6738774 Mon Sep 17 00:00:00 2001 From: paki23 Date: Thu, 30 May 2024 23:55:48 +0200 Subject: [PATCH] zoxide: add xonsh integratiion --- modules/programs/zoxide.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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') + ''; }; }