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
49
modules/servers/baldur/services/crafty-controller.nix
Normal file
49
modules/servers/baldur/services/crafty-controller.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{...}: {
|
||||
virtualisation.oci-containers.containers.crafty-controller = {
|
||||
image = "registry.gitlab.com/crafty-controller/crafty-4:latest";
|
||||
autoStart = true;
|
||||
ports = [
|
||||
"8443:8443"
|
||||
"8123:8123"
|
||||
"19132:19132"
|
||||
"25500-25600:25500-25600"
|
||||
];
|
||||
labels = {
|
||||
"io.containers.autoupdate" = "registry";
|
||||
};
|
||||
volumes = [
|
||||
"/var/lib/crafty-controller/backups:/crafty/backups"
|
||||
"/var/lib/crafty-controller/logs:/crafty/logs"
|
||||
"/var/lib/crafty-controller/servers:/crafty/servers"
|
||||
"/var/lib/crafty-controller/config:/crafty/app/config"
|
||||
"/var/lib/crafty-controller/import:/crafty/import"
|
||||
];
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [25500];
|
||||
allowedUDPPorts = [25500];
|
||||
};
|
||||
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
services.crafty.loadBalancer.servers = [
|
||||
{
|
||||
url = "https://localhost:8443";
|
||||
}
|
||||
];
|
||||
|
||||
routers.crafty = {
|
||||
rule = "Host(`crafty.cronyakatsuki.xyz`)";
|
||||
tls = {
|
||||
certResolver = "porkbun";
|
||||
};
|
||||
service = "crafty";
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
|
||||
services.restic.backups = {
|
||||
local.paths = ["/var/lib/crafty-controller"];
|
||||
server.paths = ["/var/lib/crafty-controller"];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue