about summary refs log tree commit diff stats
path: root/modules/by-name/at/atuin/module.nix
blob: 2ae6f791b21fe84fc42feee4b85e962db970e137 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
  config,
  lib,
  ...
}: let
  cfg = config.soispha.programs.atuin;
in {
  options.soispha.programs.atuin = {
    enable = lib.mkEnableOption "atuin";
  };

  config = lib.mkIf cfg.enable {
    age.secrets.atuin_encryption_key = {
      file = ./secrets/encryption_key.age;
      mode = "700";
      owner = "soispha";
      group = "users";
    };

    home-manager.users.soispha = {
      programs.atuin = {
        enable = true;
        enableZshIntegration = config.soispha.programs.zsh.enable;
        settings = {
          key_path = "${config.age.secrets.atuin_encryption_key.path}";

          # TODO: Setup a self-hosted sync server. <2024-10-18>
          session_path = "";
          auto_sync = false;
          sync_address = "";

          # Use the rather reasonable syntax of `skim` to search.
          search_mode = "skim";

          # Filter by files in a git directory, when in one.
          # The filtermode can still be changed with `<Ctrl-r>` later.
          workspaces = true;

          # Save some space, by setting the mode to 'compact' and the height to 1 (meaning
          # `atuin` may only use 1 line in the terminal).
          style = "auto";
          inline_height = 0;

          # 'k' and 'j' to move up and down.
          keymap_mode = "vim-normal";
          keymap_cursor = {
            emacs = "blink-underline";
            vim_insert = "blink-block";
            vim_normal = "blink-bar";
          };

          # Who wants software, that automatically calls home?!
          update_check = false;

          stats = {
            # This overrides the default value.
            ignored_commands = [];
          };

          # I currently don't want a sync deamon or a dotfiles manager running.
          deamon.enable = false;
          dotfiles.enable = false;
        };
      };
    };
  };
}