mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-27 06:10:53 +01:00
Added irc service
This commit is contained in:
parent
8ebcb7ef4f
commit
4c9e93f508
3 changed files with 25 additions and 22 deletions
|
@ -11,6 +11,7 @@
|
|||
|
||||
|
||||
luj = {
|
||||
irc.enable = true;
|
||||
mediaserver = {
|
||||
enable = true;
|
||||
tv.enable = true;
|
||||
|
|
|
@ -2,30 +2,32 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.luj.irc;
|
||||
port = 9117;
|
||||
port = 2042;
|
||||
in
|
||||
{
|
||||
|
||||
options.luj.irc = {
|
||||
enable = mkEnableOption "activate weechat service";
|
||||
nginx.enable = mkEnableOption "activate nginx";
|
||||
nginx.subdomain = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
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))]);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ in
|
|||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
clientMaxBodySize = "128m";
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
commonHttpConfig = ''
|
||||
server_names_hash_bucket_size 128;
|
||||
'';
|
||||
|
|
Loading…
Add table
Reference in a new issue