From 3d92ae90e7442ba9b17d16a70f65069d321b1f0b Mon Sep 17 00:00:00 2001 From: liv Date: Sat, 26 Oct 2024 11:16:08 +0200 Subject: [PATCH] servers: reorganize services on lunasa --- servers/lunasa/configuration.nix | 138 ++++--------------------------- 1 file changed, 16 insertions(+), 122 deletions(-) diff --git a/servers/lunasa/configuration.nix b/servers/lunasa/configuration.nix index 0ec252d..30c67f0 100644 --- a/servers/lunasa/configuration.nix +++ b/servers/lunasa/configuration.nix @@ -31,126 +31,29 @@ networking.firewall.allowedTCPPorts = [ 80 443 - 1935 # the RTMP port for OwnCast - 6667 # irc plaintext 25565 # minecraft ]; - services.owncast = { + services.forgejo = { enable = true; - port = 8001; - }; + lfs.enable = true; - services.ergochat = { - enable = true; settings = { - accounts = { - authentication-enabled = true; - multiclient = { - allowed-by-default = true; - always-on = "opt-out"; - auto-away = "opt-out"; - enabled = true; - }; - registration = { - allow-before-connect = true; - bcrypt-cost = 4; - email-verification = { enabled = false; }; - enabled = true; - throttling = { - duration = "10m"; - enabled = true; - max-attempts = 30; - }; - }; - }; - channels = { - default-modes = "+ntC"; - registration = { enabled = true; }; - }; - datastore = { - autoupgrade = true; - path = "/var/lib/ergo/ircd.db"; - }; - history = { - autoreplay-on-join = 0; - autoresize-window = "3d"; - channel-length = 2048; - chathistory-maxmessages = 100; - client-length = 256; - enabled = true; - restrictions = { - expire-time = "1w"; - grace-period = "1h"; - query-cutoff = "none"; - }; - retention = { - allow-individual-delete = false; - enable-account-indexing = false; - }; - tagmsg-storage = { - default = false; - whitelist = [ "+draft/react" "+react" ]; - }; - znc-maxmessages = 2048; - }; - limits = { - awaylen = 390; - channellen = 64; - identlen = 20; - kicklen = 390; - nicklen = 32; - topiclen = 390; - }; - network = { name = "linacastellane"; }; server = { - casemapping = "permissive"; - check-ident = false; - enforce-utf = true; - enforce-utf8 = true; - forward-confirm-hostnames = false; - ip-cloaking = { enabled = false; }; - ip-limits = { - count = false; - throttle = false; - }; - listeners = { - ":6667" = { }; - "127.0.0.1:8067" = { websocket = true; }; - }; - lookup-hostnames = false; - max-sendq = "1M"; - name = "chat.lina.cool"; - relaymsg = { enabled = false; }; + DOMAIN = "git.nazrin.limited"; + ROOT_URL = "https://git.nazrin.limited/"; + HTTP_PORT = 3000; }; - oper-classes = { - "chat-moderator" = { - title = "Chat Moderator"; - capabilities = [ - "kill" - "ban" - "nofakelag" - "relaymsg" - "vhosts" - "sajoin" - "samode" - "snomasks" - "roleplay" - ]; - }; - "server-admin" = { - title = "Server Admin"; - extends = "chat-moderator"; - capabilities = - [ "rehash" "accreg" "chanreg" "history" "defcon" "massmessage" ]; - }; + + service.DISABLE_REGISTRATION = true; + repository = { + ENABLE_PUSH_CREATE_USER = true; + ENABLE_PUSH_CREATE_ORG = true; }; - opers = { - admin = { - class = "server-admin"; - password = - "$2a$04$uSnmJ2i4AVYR.z/kpCirsuNQGpFLUzsmIogK6qvc9mvf8UMDKjTPG"; - }; + + actions = { + enabled = true; + DEFAULT_ACTIONS_URL = "github"; }; }; }; @@ -160,18 +63,9 @@ email = "shadows@with.al"; virtualHosts = { - "live.lina.cool" = { + "git.nazrin.limited" = { extraConfig = '' - encode gzip - reverse_proxy 127.0.0.1:8001 - ''; - }; - - "irc.lina.cool" = { - extraConfig = '' - handle /websocket { - reverse_proxy 127.0.0.1:8067 - } + reverse_proxy localhost:3000 ''; }; };