home: add atuin

I really like the `fzf` history widget, and this is not as good UI-wise.

However I like the fact that this uses a DB:

* It is more reliable when the history file gets messed up [1]
* It allows syncing between different hosts (not sure if I will use it)
* It adds more context to the search
    * The current directory
    * The shell _session_, I can *either* search all sessions or
      restrict to just the current one

I will be looking into whether or not I can hack something together to
get a better UI (by using `fzf` of course).
This commit is contained in:
Bruno BELANYI 2023-04-26 21:21:05 +01:00
parent 0ab56888bd
commit 5a9e62d556
2 changed files with 28 additions and 0 deletions

27
home/atuin/default.nix Normal file
View file

@ -0,0 +1,27 @@
{ config, lib, ... }:
let
cfg = config.my.home.atuin;
in
{
options.my.home.atuin = with lib; {
enable = my.mkDisableOption "atuin configuration";
};
config = lib.mkIf cfg.enable {
programs.atuin = {
enable = true;
flags = [
# I *despise* this hijacking of the up key, even though I use Ctrl-p
"--disable-up-arrow"
];
settings = {
# The package is managed by Nix
update_check = false;
# I don't care for the fancy display
style = "compact";
};
};
};
}

View file

@ -1,6 +1,7 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./atuin
./bat ./bat
./bluetooth ./bluetooth
./comma ./comma