diff --git a/modules/programs/atuin.nix b/modules/programs/atuin.nix index bd907ac0..21c9d702 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 { ${cfg.package}/bin/atuin 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"