{ 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}"; }; }; }