diff options
Diffstat (limited to 'modules/services')
-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}"; + }; + }; + }; +} |