# nixos-config - My current NixOS configuration # # Copyright (C) 2025 Benedikt Peetz # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of my nixos-config. # # You should have received a copy of the License along with this program. # If not, see . { config, lib, externalBinaries, system, ... }: let cfg = config.soispha.programs.atuin; in { options.soispha.programs.atuin = { enable = lib.mkEnableOption "atuin"; enableAge = lib.mkEnableOption "atuin with age keys"; }; config = lib.mkIf cfg.enable { age.secrets = { atuin_encryption_key = lib.mkIf cfg.enableAge { file = ./secrets/encryption_key.age; mode = "700"; owner = "soispha"; group = "users"; }; atuin_user_id = lib.mkIf cfg.enableAge { file = ./secrets/user_id.age; mode = "700"; owner = "soispha"; group = "users"; }; }; soispha.programs.zsh.integrations.atuin = ./atuin.zsh; home-manager.users.soispha = { programs.atuin = { enable = true; package = externalBinaries.turtle.packages.${system}.default; daemon.enable = true; # We can do this on our own. enableZshIntegration = false; settings = { sync = lib.mkIf cfg.enableAge { encryption_key_path = "${config.age.secrets.atuin_encryption_key.path}"; user_id_path = "${config.age.secrets.atuin_user_id.path}"; auto = true; address = "https://atuin-sync.vhack.eu"; }; logs = { enabled = true; dir = "${config.home-manager.users.soispha.xdg.cacheHome}/atuin/logs"; }; # 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 `` 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-bar"; vim_normal = "blink-block"; }; stats = { # This overrides the default value. ignored_commands = []; }; keymap.vim-normal = { "h" = "cursor-left"; "t" = "select-next"; "n" = "select-previous"; "s" = "cursor-right"; }; }; }; }; }; }