diff --git a/home/lander/features/cli/atuin.nix b/home/lander/features/cli/atuin.nix new file mode 100644 index 0000000..dfe099e --- /dev/null +++ b/home/lander/features/cli/atuin.nix @@ -0,0 +1,14 @@ +{ ... }: +{ + programs.atuin = { + enable = true; + enableZshIntegration = true; + + settings = { + auto_sync = true; + sync_address = "http://atuin.escapeangle.com"; + sync_frequency = "30m"; + update_check = false; + }; + }; +} diff --git a/home/lander/features/cli/default.nix b/home/lander/features/cli/default.nix index 4cd9937..0219eb7 100644 --- a/home/lander/features/cli/default.nix +++ b/home/lander/features/cli/default.nix @@ -4,6 +4,7 @@ imports = [ ./git + ./atuin.nix ./bat.nix ./btop.nix ./starship.nix diff --git a/hosts/hosting-01/default.nix b/hosts/hosting-01/default.nix index e061474..b1e0a7c 100644 --- a/hosts/hosting-01/default.nix +++ b/hosts/hosting-01/default.nix @@ -139,6 +139,23 @@ in }; }; + services.atuin = { + enable = true; + openRegistration = false; + database = { + uri = "postgresql://atuin@db-01.tailnet.escapeangle.com:5432/atuin"; + createLocally = false; + }; + }; + + services.nginx.virtualHosts."atuin.escapeangle.com" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:${toString config.services.atuin.port}"; + }; + }; + security.acme.defaults.email = "landervandenbulcke@gmail.com"; security.acme.acceptTerms = true; diff --git a/hosts/servers/db-01.nix b/hosts/servers/db-01.nix index 8484249..1fcaef4 100644 --- a/hosts/servers/db-01.nix +++ b/hosts/servers/db-01.nix @@ -9,12 +9,17 @@ host all all 100.64.0.0/24 trust # trust tailnet ''; ensureDatabases = [ + "atuin" "authelia" "forgejo" "lldap" "mealie" ]; ensureUsers = [ + { + name = "atuin"; + ensureDBOwnership = true; + } { name = "authelia"; ensureDBOwnership = true; @@ -38,6 +43,7 @@ enable = true; startAt = "*-*-* 02:00:00"; databases = [ + "atuin" "authelia" "forgejo" "lldap"