From 5a9e62d556d59aa56b4bd4666c6c02530ff4cf14 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Apr 2023 21:21:05 +0100 Subject: [PATCH] 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). --- home/atuin/default.nix | 27 +++++++++++++++++++++++++++ home/default.nix | 1 + 2 files changed, 28 insertions(+) create mode 100644 home/atuin/default.nix diff --git a/home/atuin/default.nix b/home/atuin/default.nix new file mode 100644 index 0000000..e0d1eb2 --- /dev/null +++ b/home/atuin/default.nix @@ -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"; + }; + }; + }; +} diff --git a/home/default.nix b/home/default.nix index 2e48b45..c851f76 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./atuin ./bat ./bluetooth ./comma