diff options
author | sefidel <contact@sefidel.net> | 2024-08-29 08:24:23 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2024-08-31 01:05:21 +0900 |
commit | ecbd9b1d41b710b94532a80bb49b16c57c75b82f (patch) | |
tree | bfe757420b48f639955e52e3bc2d54d5efbcc5f7 | |
parent | e410376ae56a299cf7c0232ba3e65f7144a88bd8 (diff) | |
download | infra-ecbd9b1d41b710b94532a80bb49b16c57c75b82f.tar.gz infra-ecbd9b1d41b710b94532a80bb49b16c57c75b82f.zip |
feat(modules/gamja): init
-rw-r--r-- | modules/services/gamja.nix | 26 |
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}"; + }; + }; + }; +} |