mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 18:09:06 +02:00
Changed irc service
This commit is contained in:
parent
a56bbe1f2b
commit
234cd1d1fc
2 changed files with 43 additions and 25 deletions
|
@ -2,32 +2,32 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.luj.irc;
|
||||
port = 2042;
|
||||
port = 9000;
|
||||
in
|
||||
{
|
||||
|
||||
options.luj.irc = {
|
||||
enable = mkEnableOption "activate weechat service";
|
||||
};
|
||||
enable = mkEnableOption "activate irc service";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.weechat.enable = true;
|
||||
services.nginx.virtualHosts."irc.julienmalka.me" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."^~ /weechat" = {
|
||||
proxyPass = "http://127.0.0.1:${builtins.toString port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
locations."/" = {
|
||||
root = pkgs.glowing-bear;
|
||||
};
|
||||
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))]);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue