diff --git a/hosts/flame/default.nix b/hosts/flame/default.nix index 5f9a593..a13c17b 100644 --- a/hosts/flame/default.nix +++ b/hosts/flame/default.nix @@ -52,6 +52,7 @@ inputs.nixpkgs.lib.nixosSystem { theme = { colors = (import ../../colorscheme/gruvbox).dark; }; # Programs and services + atuin.enable = true; cloudflare.enable = true; # Proxy traffic with Cloudflare dotfiles.enable = true; # Clone dotfiles neovim.enable = true; diff --git a/hosts/swan/default.nix b/hosts/swan/default.nix index f058fe9..4d7f096 100644 --- a/hosts/swan/default.nix +++ b/hosts/swan/default.nix @@ -68,6 +68,7 @@ inputs.nixpkgs.lib.nixosSystem { theme = { colors = (import ../../colorscheme/gruvbox).dark; }; # Programs and services + atuin.enable = true; neovim.enable = true; cloudflare.enable = true; dotfiles.enable = true; diff --git a/hosts/tempest/default.nix b/hosts/tempest/default.nix index 25c7ecd..ca65690 100644 --- a/hosts/tempest/default.nix +++ b/hosts/tempest/default.nix @@ -85,6 +85,7 @@ inputs.nixpkgs.lib.nixosSystem { gtk.theme.name = inputs.nixpkgs.lib.mkDefault "Adwaita-dark"; # Programs and services + atuin.enable = true; charm.enable = true; neovim.enable = true; media.enable = true; diff --git a/modules/common/shell/atuin.nix b/modules/common/shell/atuin.nix new file mode 100644 index 0000000..ad5acd8 --- /dev/null +++ b/modules/common/shell/atuin.nix @@ -0,0 +1,39 @@ +{ config, lib, ... }: { + + # Shell history sync + + options.atuin.enable = lib.mkEnableOption "Atuin"; + + config = { + + home-manager.users.${config.user} = lib.mkIf config.atuin.enable { + + programs.atuin = { + enable = true; + flags = [ "--disable-up-arrow" "--disable-ctrl-r" ]; + settings = { + auto_sync = true; + update_check = false; + sync_address = "https://api.atuin.sh"; + search_mode = "fuzzy"; + filter_mode = "host"; # global, host, session, directory + search_mode_shell_up_key_binding = "fuzzy"; + filter_mode_shell_up_key_binding = "session"; + style = "compact"; # or auto,full + show_help = true; + history_filter = [ ]; + secrets_filter = true; + enter_accept = false; + keymap_mode = "vim-normal"; + }; + }; + + }; + + # Give root user the same setup + home-manager.users.root.programs.atuin = + config.home-manager.users.${config.user}.programs.atuin; + + }; + +} diff --git a/modules/common/shell/default.nix b/modules/common/shell/default.nix index 59b17ef..efbdd84 100644 --- a/modules/common/shell/default.nix +++ b/modules/common/shell/default.nix @@ -1,5 +1,6 @@ { ... }: { imports = [ + ./atuin.nix ./bash ./charm.nix ./direnv.nix