atuin: add xonsh integration
This commit is contained in:
parent
7c60585f2e
commit
0726e1a805
|
@ -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 {
|
flags = mkOption {
|
||||||
default = [ ];
|
default = [ ];
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
|
@ -124,6 +134,10 @@ in {
|
||||||
${cfg.package}/bin/atuin init fish ${flagsStr} | source
|
${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 {
|
programs.nushell = mkIf cfg.enableNushellIntegration {
|
||||||
extraEnv = ''
|
extraEnv = ''
|
||||||
let atuin_cache = "${config.xdg.cacheHome}/atuin"
|
let atuin_cache = "${config.xdg.cacheHome}/atuin"
|
||||||
|
|
Loading…
Reference in a new issue