From 4834ad1ea13358f3f23e0139e3a8a3d1ccb804e2 Mon Sep 17 00:00:00 2001 From: Soispha Peetz Date: Fri, 30 Oct 2026 15:22:07 +0100 Subject: modules: Rename back to `by-name` There is no point in keeping just vhack here. --- modules/by-name/at/atuin-sync/module.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 modules/by-name/at/atuin-sync/module.nix (limited to 'modules/by-name/at') diff --git a/modules/by-name/at/atuin-sync/module.nix b/modules/by-name/at/atuin-sync/module.nix new file mode 100644 index 0000000..4295697 --- /dev/null +++ b/modules/by-name/at/atuin-sync/module.nix @@ -0,0 +1,32 @@ +{ + config, + lib, + ... +}: let + cfg = config.vhack.atuin-sync; +in { + options.vhack.atuin-sync = { + enable = lib.mkEnableOption "atuin (turtle) sync server"; + + fqdn = lib.mkOption { + description = "The fully qualified domain name of this instance."; + type = lib.types.str; + example = "atuin-sync.atuin.sh"; + }; + }; + + config = lib.mkIf cfg.enable { + vhack.nginx.enable = true; + + vhack.anubis.instances."${cfg.fqdn}".target = "http://127.0.0.1:${toString config.services.turtle.port}"; + + services = { + turtle = { + enable = true; + host = "127.0.0.1"; + + database.createLocally = true; + }; + }; + }; +} -- cgit v1.3.1