mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 15:09:46 +01:00
atuin: add xonsh integration
This commit is contained in:
parent
f222755f44
commit
e136408ca9
1 changed files with 14 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue