mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-04-13 22:23:11 +02:00
Changed irc service
This commit is contained in:
parent
a56bbe1f2b
commit
234cd1d1fc
2 changed files with 43 additions and 25 deletions
|
@ -51,7 +51,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# make the tailscale command usable to users
|
# make the tailscale command usable to users
|
||||||
environment.systemPackages = [ pkgs.tailscale ];
|
environment.systemPackages = [ pkgs.tailscale ];
|
||||||
|
|
||||||
|
@ -59,7 +58,7 @@
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
|
|
||||||
nix.maxJobs = lib.mkDefault 4;
|
nix.maxJobs = lib.mkDefault 6;
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
|
|
||||||
services.fail2ban.enable = true;
|
services.fail2ban.enable = true;
|
||||||
|
@ -89,17 +88,36 @@
|
||||||
services.zfs.autoSnapshot.enable = true;
|
services.zfs.autoSnapshot.enable = true;
|
||||||
services.zfs.autoScrub.enable = true;
|
services.zfs.autoScrub.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "21.11";
|
networking.wireguard.interfaces = {
|
||||||
|
wg0 = {
|
||||||
|
ips = [ "fd85:27e8:fc9::6/128" ];
|
||||||
|
listenPort = 51820;
|
||||||
|
privateKeyFile = "/root/wg-private";
|
||||||
|
|
||||||
|
peers = [
|
||||||
|
{
|
||||||
|
allowedIPs = [ "fd85:27e8:fc9::/48" ];
|
||||||
|
publicKey = "ZO8j0AwssAERtyJQO+o11pWAFKzkxTI5hmqHsfEy5Bo=";
|
||||||
|
endpoint = "core01.rz.ens.wtf:51820";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 51821 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 51821 ];
|
||||||
services.nginx.virtualHosts."jellyfin.mondon.me" = {
|
services.nginx.virtualHosts."jellyfin.mondon.me" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
proxyPass = "http://100.74.49.77";
|
proxyPass = "https://100.74.49.77";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "21.11";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,32 +2,32 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.luj.irc;
|
cfg = config.luj.irc;
|
||||||
port = 2042;
|
port = 9000;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
options.luj.irc = {
|
options.luj.irc = {
|
||||||
enable = mkEnableOption "activate weechat service";
|
enable = mkEnableOption "activate irc service";
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
nginx.enable = mkEnableOption "activate nginx";
|
||||||
|
nginx.subdomain = mkOption {
|
||||||
services.weechat.enable = true;
|
type = types.str;
|
||||||
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.thelounge = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
(mkIf cfg.nginx.enable (mkSubdomain cfg.nginx.subdomain port))
|
||||||
|
(mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue