about summary refs log blame commit diff stats
path: root/modules/by-name/ga/gallery/module.nix
blob: a5237e6256a306aeef1e989de55cb138d6917173 (plain) (tree)




















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