diff --git a/modules/programs/atuin.nix b/modules/programs/atuin.nix index a27bcf860..f6b77e27b 100644 --- a/modules/programs/atuin.nix +++ b/modules/programs/atuin.nix @@ -51,6 +51,16 @@ in { ''; }; + enableXonshIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Atuin's Xonsh integration. + + If enabled, this will bind the up-arrow key to open the Atuin history. + ''; + }; + flags = mkOption { default = [ ]; type = types.listOf types.str; @@ -124,6 +134,10 @@ in { ${lib.getExe cfg.package} init fish ${flagsStr} | source ''; + programs.xonsh.xonshrc = mkIf cfg.enableXonshIntegration '' + execx($(${cfg.package}/bin/atuin init xonsh)) + ''; + programs.nushell = mkIf cfg.enableNushellIntegration { extraEnv = '' let atuin_cache = "${config.xdg.cacheHome}/atuin"