From c9c8ae9a41aba7a385fd6a1da9ac65824715b7a6 Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 28 Apr 2024 13:39:08 +0900 Subject: [PATCH] Testing out Atuin --- home-manager/common/software/cli/atuin.nix | 15 +++++++++++++++ home-manager/common/software/cli/default.nix | 3 ++- home-manager/small.nix | 1 + nixos/common/services/atuin.nix | 9 +++++++++ nixos/common/services/openssh.nix | 4 ++-- nixos/hosts/framework-server/default.nix | 1 + 6 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 home-manager/common/software/cli/atuin.nix create mode 100644 nixos/common/services/atuin.nix diff --git a/home-manager/common/software/cli/atuin.nix b/home-manager/common/software/cli/atuin.nix new file mode 100644 index 00000000..131b35bb --- /dev/null +++ b/home-manager/common/software/cli/atuin.nix @@ -0,0 +1,15 @@ +{ ... }: { + programs.atuin = { + enable = true; + enableBashIntegration = true; + enableFishIntegration = true; + enableNushellIntegration = true; + enableZshIntegration = true; + settings = { + auto_sync = true; + sync_frequency = "5m"; + sync_address = "framework-server:8888"; + search_mode = "prefix"; + }; + }; +} diff --git a/home-manager/common/software/cli/default.nix b/home-manager/common/software/cli/default.nix index 18be5184..30e19bdb 100644 --- a/home-manager/common/software/cli/default.nix +++ b/home-manager/common/software/cli/default.nix @@ -1,5 +1,6 @@ { ... }: { - imports = [ + imports = [ + ./atuin.nix ./bash.nix ./btop.nix ./starship.nix diff --git a/home-manager/small.nix b/home-manager/small.nix index c9da1560..e81a4dbc 100644 --- a/home-manager/small.nix +++ b/home-manager/small.nix @@ -8,6 +8,7 @@ ./common/software/cli/btop.nix ./common/software/cli/starship.nix ./common/software/cli/tmux.nix + ./common/software/cli/atuin.nix # User configs ./users/${username} diff --git a/nixos/common/services/atuin.nix b/nixos/common/services/atuin.nix new file mode 100644 index 00000000..9e5ef945 --- /dev/null +++ b/nixos/common/services/atuin.nix @@ -0,0 +1,9 @@ +{ ... }: { + services.atuin = { + enable = true; + port = 8888; + database.createLocally = true; + openRegistration = true; + }; + networking.firewall.interfaces.tailscale0.allowedTCPPorts = [ 8888 ]; +} diff --git a/nixos/common/services/openssh.nix b/nixos/common/services/openssh.nix index 9e154408..fba48fb4 100644 --- a/nixos/common/services/openssh.nix +++ b/nixos/common/services/openssh.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hostname, ... }: { +{ hostname, ... }: { # enable passwordless elevation # Useful for deploy-rs security.pam.enableSSHAgentAuth = true; @@ -56,4 +56,4 @@ -- ''; }; -} \ No newline at end of file +} diff --git a/nixos/hosts/framework-server/default.nix b/nixos/hosts/framework-server/default.nix index fa14ba95..282026f5 100644 --- a/nixos/hosts/framework-server/default.nix +++ b/nixos/hosts/framework-server/default.nix @@ -9,6 +9,7 @@ ../../common/modules/ssh-luks.nix ../../common/services/docker.nix ../../common/services/tailscale-autoconnect.nix + ../../common/services/atuin.nix ./containers.nix ./disks.nix ./wireguard.nix