aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-08-29 08:24:23 +0900
committersefidel <contact@sefidel.net>2024-08-31 01:05:21 +0900
commitecbd9b1d41b710b94532a80bb49b16c57c75b82f (patch)
treebfe757420b48f639955e52e3bc2d54d5efbcc5f7
parente410376ae56a299cf7c0232ba3e65f7144a88bd8 (diff)
downloadinfra-ecbd9b1d41b710b94532a80bb49b16c57c75b82f.zip
feat(modules/gamja): init
-rw-r--r--modules/services/gamja.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/services/gamja.nix b/modules/services/gamja.nix
new file mode 100644
index 0000000..ed3cead
--- /dev/null
+++ b/modules/services/gamja.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.modules.services.gamja;
+in
+{
+ options.modules.services.gamja = {
+ enable = mkEnableOption "gamja web IRC client";
+
+ domain = mkOption { type = types.str; };
+ realHost = mkOption { type = types.str; };
+ server = mkOption { type = types.str; };
+ };
+
+ config = mkIf cfg.enable {
+ services.nginx.virtualHosts.${cfg.realHost} = {
+ forceSSL = true;
+ useACMEHost = cfg.domain;
+
+ root = pkgs.gamja.override {
+ gamjaConfig.server.url = "wss://${cfg.server}";
+ };
+ };
+ };
+}