2024-03-30 20:18:12 +01:00
|
|
|
{ lib, config, ... }:
|
2022-03-10 15:25:23 +01:00
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.luj.irc;
|
2024-12-07 01:03:20 +01:00
|
|
|
port = 8349;
|
2022-03-10 15:25:23 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
|
|
|
|
options.luj.irc = {
|
2022-05-25 07:34:01 +02:00
|
|
|
enable = mkEnableOption "activate irc service";
|
2022-03-11 01:07:21 +01:00
|
|
|
|
2022-05-25 07:34:01 +02:00
|
|
|
nginx.enable = mkEnableOption "activate nginx";
|
|
|
|
nginx.subdomain = mkOption {
|
|
|
|
type = types.str;
|
2022-03-11 01:07:21 +01:00
|
|
|
};
|
2022-03-10 15:25:23 +01:00
|
|
|
|
2022-03-11 01:07:21 +01:00
|
|
|
};
|
2022-03-10 15:25:23 +01:00
|
|
|
|
2024-11-01 22:43:24 +01:00
|
|
|
config = mkIf cfg.enable (mkMerge [
|
|
|
|
{
|
2022-05-25 07:34:01 +02:00
|
|
|
services.thelounge = {
|
2024-12-07 01:03:20 +01:00
|
|
|
inherit port;
|
2022-05-25 07:34:01 +02:00
|
|
|
enable = true;
|
2024-11-01 22:43:24 +01:00
|
|
|
public = false;
|
|
|
|
extraConfig.fileUpload.enable = true;
|
2022-05-25 07:34:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2022-03-10 15:25:23 +01:00
|
|
|
|
2024-11-01 22:43:24 +01:00
|
|
|
(mkIf cfg.nginx.enable (mkSubdomain cfg.nginx.subdomain port))
|
|
|
|
(mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))
|
|
|
|
]);
|
2022-05-25 07:34:01 +02:00
|
|
|
|
|
|
|
}
|