this repo has no description
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(wolumonde): add forgejo metrics, serve robotstxt on anubis and enable og passthrough

dusk 7c4d4c9e 02c38c4d

+25 -5
+25 -5
hosts/wolumonde/modules/forgejo.nix
··· 1 1 { pkgs, config, ... }: 2 + let 3 + forgejoCfg = config.services.forgejo.settings; 4 + anubisCfg = config.services.anubis.instances."forgejo".settings; 5 + in 2 6 { 3 7 services.forgejo = { 4 8 enable = true; ··· 22 26 THEMES = "edge-dark,forgejo-dark"; 23 27 THEME_COLOR_META_TAG = "#333644"; 24 28 }; 29 + metrics.ENABLED = true; 25 30 }; 26 31 }; 27 32 ··· 30 35 forceSSL = true; 31 36 quic = true; 32 37 kTLS = true; 38 + # disallow metrics for public 39 + locations."/metrics".return = "403"; 33 40 locations."/" = { 34 41 extraConfig = '' 35 42 client_max_body_size 1000m; 36 43 ''; 37 - proxyPass = "http://localhost${config.services.anubis.instances."forgejo".settings.BIND}"; 44 + proxyPass = "http://localhost${anubisCfg.BIND}"; 38 45 }; 39 46 }; 40 47 41 - services.anubis.instances."forgejo" = { 42 - settings.BIND = ":6293"; 43 - settings.BIND_NETWORK = "tcp"; 44 - settings.TARGET = "http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}"; 48 + services.anubis.instances."forgejo".settings = { 49 + BIND = ":6293"; 50 + BIND_NETWORK = "tcp"; 51 + TARGET = "http://localhost:${toString forgejoCfg.server.HTTP_PORT}"; 52 + WEBMASTER_EMAIL = "90008@gaze.systems"; 53 + SERVE_ROBOTS_TXT = true; 54 + OG_PASSTHROUGH = true; 55 + DIFFICULTY = 4; 45 56 }; 57 + 58 + # scrape forgejo metrics 59 + services.victoriametrics.prometheusConfig.scrape_configs = [ 60 + { 61 + job_name = "forgejo"; 62 + metrics_path = "/metrics"; 63 + static_configs = [ { targets = [ "localhost:${toString forgejoCfg.server.HTTP_PORT}" ]; } ]; 64 + } 65 + ]; 46 66 }