From c153a351659e4596acfc31f00bf594343cbfcd68 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 30 Jul 2026 14:05:39 +0200 Subject: modules: Use namespaces That might make it easier in the future to merge different server configs together (and thusly facilitate code-reuse.). --- modules/vhack/at/atuin-sync/module.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 modules/vhack/at/atuin-sync/module.nix (limited to 'modules/vhack/at') diff --git a/modules/vhack/at/atuin-sync/module.nix b/modules/vhack/at/atuin-sync/module.nix new file mode 100644 index 0000000..4295697 --- /dev/null +++ b/modules/vhack/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