1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 13:39:46 +01:00

atuin: add xonsh integration

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

View file

@ -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"