refactor: reorganize server modules
- Moved each individual service definition into a dedicated `services/` directory under every server module (e.g. `modules/servers/bragi/services/`). - Updated the corresponding `default.nix` files to import the renamed service modules from the new location. - Applied the same changes across all server modules, ensuring the API and import paths remain consistent.
This commit is contained in:
parent
8a149c3533
commit
4e783c052b
45 changed files with 97 additions and 63 deletions
39
modules/servers/heimdall/services/redlib.nix
Normal file
39
modules/servers/heimdall/services/redlib.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{...}: {
|
||||
services.redlib = {
|
||||
enable = true;
|
||||
address = "127.0.0.1";
|
||||
settings = {
|
||||
ROBOTS_DISABLE_INDEXING = "on";
|
||||
THEME = "gruvboxdark";
|
||||
USE_HLS = "on";
|
||||
};
|
||||
};
|
||||
|
||||
# Setup anubis to block fucking ai bots
|
||||
services.anubis.instances.redlib = {
|
||||
settings = {
|
||||
TARGET = "http://127.0.0.1:8080";
|
||||
BIND_NETWORK = "tcp";
|
||||
BIND = "127.0.0.1:8081";
|
||||
SERVE_ROBOTS_TXT = true;
|
||||
DIFFICULTY = 5;
|
||||
};
|
||||
};
|
||||
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
services.redlib.loadBalancer.servers = [
|
||||
{
|
||||
url = "http://localhost:8081";
|
||||
}
|
||||
];
|
||||
|
||||
routers.redlib = {
|
||||
rule = "Host(`libreddit.cronyakatsuki.xyz`)";
|
||||
tls = {
|
||||
certResolver = "porkbun";
|
||||
};
|
||||
service = "redlib";
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue