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/ga/gallery/module.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 modules/vhack/ga/gallery/module.nix (limited to 'modules/vhack/ga/gallery') diff --git a/modules/vhack/ga/gallery/module.nix b/modules/vhack/ga/gallery/module.nix new file mode 100644 index 0000000..a5237e6 --- /dev/null +++ b/modules/vhack/ga/gallery/module.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: let + cfg = config.sils.gallery; +in { + options.sils.gallery = { + enable = lib.mkEnableOption "a stateful static gallery site"; + domain = lib.mkOption { + type = lib.types.str; + }; + }; + config = lib.mkIf cfg.enable { + vhack.nginx.enable = true; + services.nginx.virtualHosts."${cfg.domain}" = { + forceSSL = true; + enableACME = true; + root = "/srv/${cfg.domain}"; + }; + }; +} -- cgit v1.3.1