Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
13f9da0
Integrate atuin without server sync
kachick Aug 10, 2023
2e9f616
Disable hijacking up-arrow by atuin
kachick Aug 10, 2023
5437d3e
Merge branch 'main' into secret-history
kachick Jul 18, 2025
93c7754
Clarify testing the atuin ctrl+r
kachick Jul 18, 2025
6134b36
Run atuin server on algae
kachick Jul 18, 2025
8760d60
Merge branch 'main' into secret-history
kachick Aug 18, 2025
1753a70
Disable atuin on bash
kachick Aug 18, 2025
360f92b
Disable atuin ctrl-r
kachick Aug 18, 2025
f69082a
Adjust atuin server config
kachick Aug 20, 2025
85b1101
Merge branch 'main' into secret-history
kachick Aug 20, 2025
20ce45b
Merge branch 'main' into secret-history
kachick Sep 18, 2025
f655eed
atuin: openRegistration
kachick Sep 18, 2025
326a6e6
Clarify port for self hosted atuin
kachick Sep 18, 2025
f0d0468
Test with http
kachick Sep 18, 2025
17c0110
Enable SSH portforwarding for atuin
kachick Sep 18, 2025
79ce1a4
Update config around atuin
kachick Sep 18, 2025
9ae07b6
Use caddy for atuin server
kachick Sep 18, 2025
6df3dfc
Update config and comments about atuin
kachick Sep 18, 2025
d54e4ae
Merge branch 'main' into secret-history
kachick Oct 25, 2025
19f6c9d
Comment-out unused atuin code
kachick Oct 25, 2025
19ed2c7
Run tailscale serve on systemd
kachick Oct 25, 2025
4b84368
Set user
kachick Oct 25, 2025
77bd10b
Ensure to avoid atuin default API
kachick Oct 25, 2025
47227a4
Bump flake.lock and related dependencies (#1320)
selfup-runner[bot] Oct 27, 2025
8bb40f1
Bump actions/upload-artifact from 4 to 5 (#1322)
dependabot[bot] Oct 27, 2025
04508c8
Prevent access to external service with the customizing config
kachick Oct 27, 2025
a1a9e41
Enable ctrl+r on atuin
kachick Oct 27, 2025
69437c5
Update legacy comments
kachick Oct 27, 2025
8ba9fc0
Merge branch 'main' into secret-history-local
kachick Oct 27, 2025
de6d2bf
Share atuin port except home-manager
kachick Oct 27, 2025
090d53d
Prefer fzf again
kachick Oct 27, 2025
6e1dea4
Correct env in comment
kachick Oct 28, 2025
a56e051
Relax systemd retry
kachick Oct 28, 2025
2c6b201
Prefer nobody account for this role
kachick Oct 28, 2025
580f4ef
Clarify enter_accept
kachick Oct 28, 2025
27c5b46
Add comment about bash integrations
kachick Oct 28, 2025
a6557a9
Merge branch 'main' into secret-history
kachick Oct 31, 2025
058c9b2
yaneuraou: 9.01-unstable -> 9.01
kachick Nov 1, 2025
ffd14ea
Merge branch 'main' into secret-history
kachick Nov 1, 2025
070e70a
Revert "Prefer nobody account for this role"
kachick Nov 1, 2025
878a87f
Reapply "Prefer nobody account for this role"
kachick Nov 1, 2025
0d7a51a
Merge branch 'main' into secret-history
kachick Nov 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions home-manager/bash.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
programs.fzf.enableBashIntegration = false; # GH-1192: Don't enable fzf integrations, it makes shell startup slower. Load only key-bindings if required.
programs.television.enableBashIntegration = false; # Conflict with fzf by default
programs.zellij.enableBashIntegration = false; # Intentionally disabled for keeping stable bash
programs.atuin.enableBashIntegration = false; # Because of atuin depends on ble.sh. See also https://github.com/atuinsh/atuin/issues/1798

# Used only in bash - https://unix.stackexchange.com/a/689403
# https://github.com/nix-community/home-manager/blob/release-24.11/modules/programs/readline.nix
Expand Down
27 changes: 27 additions & 0 deletions home-manager/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,33 @@
];
};

# https://github.com/nix-community/home-manager/blob/release-25.05/modules/programs/atuin.nix
programs.atuin = {
enable = true;

flags = [
# https://github.com/atuinsh/atuin/issues/51
"--disable-up-arrow"

# NOTE: Add another keybind if I found suitable one
"--disable-ctrl-r" # Prefer fzf key-bindings. Use `atuin search --interactive` instead.
Comment thread
kachick marked this conversation as resolved.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sync results also available on normal history and fzf...?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

history export (and re-import: https://github.com/atuinsh/atuin/issues/816

@kachick kachick Oct 28, 2025

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pressing Right arrow: -> key in the interactive mode, it exits likely pressing Enter

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enter Execute selected item
ctrl + f / ➡️ Move the cursor to the right

From the doc, the behavior is incorrect: https://docs.atuin.sh/configuration/key-binding/#atuin-ui-shortcuts

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ctrl + b / ⬅︎ Move the cursor to the left

<- also simply exits

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atuin does not indicate current matching parts such as fzf

-> It might be fixed in unstable atuin versions: https://forum.atuin.sh/t/highlight-part-of-query-being-matched-in-search-history-similar-to-fzf/1254/2

];

settings = {
# auto_sync = true; # TODO: Consider enabling after test

# Set a temporary value here to prevent using an external service like the default https://api.atuin.sh/.
# Current issues:
# - Atuin TLS support is disabled.
# - The NixOS module does not seem to accept config files or support TLS.
# Requirements before actual setup: Set ATUIN_SYNC_ADDRESS="https://algae.${TAILNET_DOMAIN}" on each device.
# Typically written to: "$XDG_CONFIG_HOME/zsh/.zshenv.local"
sync_address = "http://algae.local:8888";

enter_accept = false; # Ensure disabling even through it is the default.
};
};

# https://github.com/nix-community/home-manager/blob/release-25.05/modules/programs/yazi.nix
programs.yazi = {
enable = true;
Expand Down
1 change: 1 addition & 0 deletions home-manager/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
direnv
unstable.nixfmt
nushell
atuin

fzf # History: CTRL+R, Walker: CTRL+T
# fzf-git-sh for CTRL-G CTRL-{} keybinds should be manually integrated in each shell
Expand Down
1 change: 1 addition & 0 deletions home-manager/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ in
programs.fzf.enableZshIntegration = false; # GH-1192: Don't enable fzf integrations, it makes shell startup slower. Load only key-bindings if required.
programs.television.enableZshIntegration = false; # Conflict with fzf by default
programs.zellij.enableZshIntegration = false; # Avoid nested zellij in host and remote login as container
programs.atuin.enableZshIntegration = true;

home.activation.refreshZcompdumpCache = config.lib.dag.entryAnywhere ''
if [[ -v oldGenPath && -f '${ZCOMPDUMP_CACHE_PATH}' ]]; then
Expand Down
8 changes: 8 additions & 0 deletions nixos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,12 @@

# https://github.com/NixOS/nixpkgs/blob/nixos-25.05/nixos/modules/security/sudo-rs.nix
security.sudo-rs.enable = true;

networking.hosts = {
Comment thread
kachick marked this conversation as resolved.
"127.0.0.1" = [
# The motivation is: https://github.com/kachick/dotfiles/pull/266#discussion_r2462670847
# Ensure to avoid the default URL in atuin connections
"api.atuin.sh"
];
};
}
36 changes: 36 additions & 0 deletions nixos/hosts/algae/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
pkgs,
inputs,
config,
...
}:

Expand Down Expand Up @@ -68,6 +69,41 @@
AllowSuspendThenHibernate=no
'';

# https://github.com/NixOS/nixpkgs/blob/nixos-25.05/nixos/modules/services/misc/atuin.nix
# atuin module appears not supporting customizing server.toml: https://github.com/NixOS/nixpkgs/blob/e9b7f2ff62b35f711568b1f0866243c7c302028d/nixos/modules/services/misc/atuin.nix#L148
services.atuin = {
enable = true;
openRegistration = true; # Always allow to help the testing. It is okay, this server only useable on private networks
};

systemd.services.tailscale-serve-atuin = {
description = "Support atuin server via tailscale. See GH-173 and GH-266";
wantedBy = [
"multi-user.target"
];

after = [
"tailscaled.service"
"atuin.service"
];

requires = [
"tailscaled.service"
"atuin.service"
];

serviceConfig = {
User = "nobody";
Type = "simple";

# If run without systemd, `--bg` flag might helps
ExecStart = "${pkgs.unstable.tailscale}/bin/tailscale serve ${toString config.services.atuin.port}";

Restart = "on-failure";
RestartSec = 15;
};
};

environment.systemPackages = with pkgs; [
# Available since https://github.com/NixOS/nixpkgs/pull/406363
(patched.yaneuraou.override {
Expand Down
Loading