add atuin for managing shell history

This commit is contained in:
ulic-youthlic 2025-01-23 23:14:02 +08:00
parent 88feb822bd
commit c6e370656b
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
4 changed files with 44 additions and 2 deletions

39
home/modules/atuin.nix Normal file
View file

@ -0,0 +1,39 @@
{ lib, config, ... }:
let
cfg = config.youthlic.programs.atuin;
in
{
options = {
youthlic.programs.atuin = {
enable = lib.mkEnableOption "atuin";
};
};
config = lib.mkMerge [
(lib.mkIf cfg.enable {
programs.atuin = {
daemon = {
enable = true;
logLevel = "trace";
};
enable = true;
settings = {
auto_sync = true;
update_check = false;
style = "full";
history_filter = [
"^ .*"
];
enter_accept = false;
keymap_mode = "vim-insert";
sync.records = true;
};
};
})
(lib.mkIf config.youthlic.programs.fish.enable {
programs.atuin.enableFishIntegration = true;
})
(lib.mkIf config.youthlic.programs.bash.enable {
programs.atuin.enableBashIntegration = true;
})
];
}

View file

@ -25,6 +25,7 @@
./waybar.nix
./mpv.nix
./kvm.nix
./atuin.nix
];
options = {