mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-25 21:30:52 +01:00
34 lines
630 B
Nix
34 lines
630 B
Nix
{ lib, config, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.luj.irc;
|
|
port = 8349;
|
|
in
|
|
{
|
|
|
|
options.luj.irc = {
|
|
enable = mkEnableOption "activate irc service";
|
|
|
|
nginx.enable = mkEnableOption "activate nginx";
|
|
nginx.subdomain = mkOption {
|
|
type = types.str;
|
|
};
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable (mkMerge [
|
|
{
|
|
services.thelounge = {
|
|
inherit port;
|
|
enable = true;
|
|
public = false;
|
|
extraConfig.fileUpload.enable = true;
|
|
};
|
|
|
|
}
|
|
|
|
(mkIf cfg.nginx.enable (mkSubdomain cfg.nginx.subdomain port))
|
|
(mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))
|
|
]);
|
|
|
|
}
|