diff --git a/modules/irc/default.nix b/modules/irc/default.nix new file mode 100644 index 0000000..9e8ca76 --- /dev/null +++ b/modules/irc/default.nix @@ -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))]); + + + + +}