From 281478f061ce87b126edbc3e76cb793921203ca2 Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Mon, 20 Jan 2025 16:14:55 +0100 Subject: feat(modules/gallery): init --- modules/by-name/ga/gallery/module.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 modules/by-name/ga/gallery/module.nix (limited to 'modules/by-name/ga/gallery') diff --git a/modules/by-name/ga/gallery/module.nix b/modules/by-name/ga/gallery/module.nix new file mode 100644 index 0000000..a5237e6 --- /dev/null +++ b/modules/by-name/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 1.4.1