From ecbd9b1d41b710b94532a80bb49b16c57c75b82f Mon Sep 17 00:00:00 2001 From: sefidel Date: Thu, 29 Aug 2024 08:24:23 +0900 Subject: feat(modules/gamja): init --- modules/services/gamja.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 modules/services/gamja.nix (limited to 'modules') 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}"; + }; + }; + }; +} -- cgit 1.4.1