Added an irc service

This commit is contained in:
Julien Malka 2022-03-10 15:25:23 +01:00
parent 35f2efc973
commit 2162967af4
No known key found for this signature in database
GPG key ID: 3C68E13964FEA07F

31
modules/irc/default.nix Normal file
View file

@ -0,0 +1,31 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.luj.irc;
port = 9117;
in
{
options.luj.irc = {
enable = mkEnableOption "activate weechat service";
nginx.enable = mkEnableOption "activate nginx";
nginx.subdomain = mkOption {
type = types.str;
};
};
config = mkIf cfg.enable (
mkMerge [{
services.weechat.enable = true;
}
(mkIf cfg.nginx.enable (mkPrivateSubdomain cfg.nginx.subdomain port))
(mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))]);
}