block some services from forgejo
This commit is contained in:
parent
d5203e025e
commit
18eb50a602
3 changed files with 16 additions and 4 deletions
|
|
@ -10,11 +10,14 @@
|
||||||
networking.firewall.allowedTCPPorts = [ 443 ];
|
networking.firewall.allowedTCPPorts = [ 443 ];
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
email = "hen" + "ry@he" + "nryhi" + "les.c" + "om";
|
email = "henry@henryhiles.com";
|
||||||
environmentFile = config.age.secrets."base64JwtSecret.age".path;
|
environmentFile = config.age.secrets."base64JwtSecret.age".path;
|
||||||
package = pkgs.caddy.withPlugins {
|
package = pkgs.caddy.withPlugins {
|
||||||
plugins = [ "github.com/ggicci/caddy-jwt@v1.1.0" ];
|
plugins = [
|
||||||
hash = "sha256-ZpPFPJwjIEpF7NpbfmeGvM3auM8W0KZU9GoCDKC0HQM=";
|
"github.com/ggicci/caddy-jwt@v1.1.0"
|
||||||
|
"pkg.jsn.cam/caddy-defender@v0.9.0"
|
||||||
|
];
|
||||||
|
hash = "sha256-DO4jgD7UWva6z2/pQT+4RfBfKoBAAZVCgjXC/unYCQk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts = lib.mapAttrs (domain: host: {
|
virtualHosts = lib.mapAttrs (domain: host: {
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,10 @@
|
||||||
Disallow: /*/*/archive/
|
Disallow: /*/*/archive/
|
||||||
Disallow: /*/*/src/commit
|
Disallow: /*/*/src/commit
|
||||||
EOF 200
|
EOF 200
|
||||||
|
|
||||||
|
defender garbage {
|
||||||
|
ranges aliyun vpn aws deepseek githubcopilot gcloud oci azurepubliccloud openai mistral vultr cloudflare digitalocean linode
|
||||||
|
}
|
||||||
reverse_proxy unix/${socket}
|
reverse_proxy unix/${socket}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,12 @@ in
|
||||||
format = "mautrix-go";
|
format = "mautrix-go";
|
||||||
port = 8000;
|
port = 8000;
|
||||||
package = pkgs.mautrix-gmessages.override { withGoolm = true; };
|
package = pkgs.mautrix-gmessages.override { withGoolm = true; };
|
||||||
inherit settings;
|
settings = settings // {
|
||||||
|
appservice = {
|
||||||
|
as_token = "$CUSTOM_AS_TOKEN";
|
||||||
|
hs_token = "$CUSTOM_HS_TOKEN";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mautrix-whatsapp = {
|
mautrix-whatsapp = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue