mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-25 21:30:52 +01:00
33 lines
546 B
Nix
33 lines
546 B
Nix
{ lib, config, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.luj.irc;
|
|
port = 9000;
|
|
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 = {
|
|
enable = true;
|
|
};
|
|
|
|
}
|
|
|
|
(mkIf cfg.nginx.enable (mkSubdomain cfg.nginx.subdomain port))
|
|
(mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))]);
|
|
|
|
|
|
|
|
|
|
}
|