aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/at/atuin/module.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/by-name/at/atuin/module.nix67
1 files changed, 41 insertions, 26 deletions
diff --git a/modules/by-name/at/atuin/module.nix b/modules/by-name/at/atuin/module.nix
index 700f50fb..d68e830c 100644
--- a/modules/by-name/at/atuin/module.nix
+++ b/modules/by-name/at/atuin/module.nix
@@ -10,7 +10,8 @@
{
config,
lib,
- pkgs,
+ externalBinaries,
+ system,
...
}: let
cfg = config.soispha.programs.atuin;
@@ -22,35 +23,49 @@ in {
};
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";
+ 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;
+ soispha.services.unison.pathsToIgnore = [
+ # Already synchronized by atuin sync server
+ "~/.local/share/atuin"
+ "~/.local/share/turtle"
+ ];
home-manager.users.soispha = {
- programs.atuin = {
+ imports = [
+ externalBinaries.turtle.nixosModules.home-manager
+ ];
+
+ programs.turtle = {
enable = true;
- package = pkgs.atuin-dvorak;
- # We can do this on our own.
- enableZshIntegration = false;
settings = {
- key_path = lib.mkMerge [
- (lib.mkIf cfg.enableAge "${config.age.secrets.atuin_encryption_key.path}")
- (lib.mkIf (!cfg.enableAge)
- "${config.home-manager.users.soispha.xdg.dataHome}/atuin/atuin_secret_key.key")
- ];
-
sync = lib.mkIf cfg.enableAge {
- # The v2 sync API
- records = true;
+ 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}/turtle/logs";
};
- auto_sync = lib.mkIf cfg.enableAge true;
- sync_address = lib.mkIf cfg.enableAge "https://atuin-sync.vhack.eu";
# Use the rather reasonable syntax of `skim` to search.
search_mode = "skim";
@@ -72,17 +87,17 @@ in {
vim_normal = "blink-block";
};
- # 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;
+ keymap.vim-normal = {
+ "h" = "cursor-left";
+ "t" = "select-next";
+ "n" = "select-previous";
+ "s" = "cursor-right";
+ };
};
};
};