mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-07-04 17:51:48 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 110096abff |
@@ -229,7 +229,6 @@
|
|||||||
modules = [
|
modules = [
|
||||||
inputs.nix-gitea-themes.nixosModules.default
|
inputs.nix-gitea-themes.nixosModules.default
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
self.nixosModules.robots-txt
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -193,109 +193,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.robots-txt."gitea" = {
|
|
||||||
virtualHost = domain;
|
|
||||||
rules = [
|
|
||||||
{
|
|
||||||
pre_comment = ''
|
|
||||||
Gitea internals
|
|
||||||
|
|
||||||
See these for more information:
|
|
||||||
- https://gitea.com/robots.txt
|
|
||||||
- https://codeberg.org/robots.txt
|
|
||||||
'';
|
|
||||||
User-agent = "*";
|
|
||||||
Disallow = [
|
|
||||||
"/api/*"
|
|
||||||
"/avatars"
|
|
||||||
"/*/*/src/commit/*"
|
|
||||||
"/*/*/commit/*"
|
|
||||||
"/*/*/*/refs/*"
|
|
||||||
"/*/*/*/star"
|
|
||||||
"/*/*/*/watch"
|
|
||||||
"/*/*/labels"
|
|
||||||
"/*/*/activity/*"
|
|
||||||
"/vendor/*"
|
|
||||||
"/swagger.*.json"
|
|
||||||
"/repo/create"
|
|
||||||
"/repo/migrate"
|
|
||||||
"/org/create"
|
|
||||||
"/*/*/fork"
|
|
||||||
"/*/*/watchers"
|
|
||||||
"/*/*/stargazers"
|
|
||||||
"/*/*/forks"
|
|
||||||
"*/.git/"
|
|
||||||
"/*.git"
|
|
||||||
"/*.atom"
|
|
||||||
"/*.rss"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
pre_comment = "Language Spam";
|
|
||||||
Disallow = "/*?lang=";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
pre_comment = ''
|
|
||||||
AI bots
|
|
||||||
|
|
||||||
Sourced from:
|
|
||||||
- https://www.vg.no/robots.txt
|
|
||||||
- https://codeberg.org/robots.txt
|
|
||||||
'';
|
|
||||||
User-agent = [
|
|
||||||
"AI2Bot"
|
|
||||||
"Ai2Bot-Dolma"
|
|
||||||
"Amazonbot"
|
|
||||||
"Applebot-Extended"
|
|
||||||
"Bytespider"
|
|
||||||
"CCBot"
|
|
||||||
"ChatGPT-User"
|
|
||||||
"Claude-Web"
|
|
||||||
"ClaudeBot"
|
|
||||||
"Crawlspace"
|
|
||||||
"Diffbot"
|
|
||||||
"FacebookBot"
|
|
||||||
"FriendlyCrawler"
|
|
||||||
"GPTBot"
|
|
||||||
"Google-Extended"
|
|
||||||
"ICC-Crawler"
|
|
||||||
"ImagesiftBot"
|
|
||||||
"Kangaroo Bot"
|
|
||||||
"Meta-ExternalAgent"
|
|
||||||
"OAI-SearchBot"
|
|
||||||
"Omgili"
|
|
||||||
"Omgilibot"
|
|
||||||
"PanguBot"
|
|
||||||
"PerplexityBot"
|
|
||||||
"PetalBot"
|
|
||||||
"Scrapy"
|
|
||||||
"SemrushBot-OCOB"
|
|
||||||
"Sidetrade indexer bot"
|
|
||||||
"Timpibot"
|
|
||||||
"VelenPublicWebCrawler"
|
|
||||||
"Webzio-Extended"
|
|
||||||
"YouBot"
|
|
||||||
"anthropic-ai"
|
|
||||||
"cohere-ai"
|
|
||||||
"cohere-training-data-crawler"
|
|
||||||
"facebookexternalhit"
|
|
||||||
"iaskspider/2.0"
|
|
||||||
"img2dataset"
|
|
||||||
"meta-externalagent"
|
|
||||||
"omgili"
|
|
||||||
"omgilibot"
|
|
||||||
];
|
|
||||||
Disallow = "/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
Crawl-delay = "2";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
Sitemap = "https://${domain}/sitemap.xml";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||||
|
|
||||||
services.rsync-pull-targets = {
|
services.rsync-pull-targets = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
services.postfix.enable = lib.mkForce false;
|
services.postfix.enable = lib.mkForce false;
|
||||||
|
|
||||||
@@ -9,4 +9,26 @@
|
|||||||
remotes = "mail.pvv.ntnu.no smtp --port=25";
|
remotes = "mail.pvv.ntnu.no smtp --port=25";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.sockets.userweb-sendmail-sandbox-proxy = {
|
||||||
|
wantedBy = [ "sockets.target" ];
|
||||||
|
listenStreams = [ "/run/userweb-sendmail-sandbox-proxy.sock" ];
|
||||||
|
socketConfig = {
|
||||||
|
# Accept = true;
|
||||||
|
SocketUser = "httpd";
|
||||||
|
SocketGroup = "httpd"; # TODO: is wwwrun(54) in this group?
|
||||||
|
SocketMode = "0660";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.userweb-sendmail-sandbox-proxy = {
|
||||||
|
serviceConfig = {
|
||||||
|
User = "root";
|
||||||
|
Group = "root";
|
||||||
|
Sockets = [
|
||||||
|
"userweb-sendmail-sandbox-proxy.socket"
|
||||||
|
];
|
||||||
|
ExecStart = "${lib.getExe pkgs.hello}";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user