modularization of all servers donion rings

This commit is contained in:
2024-06-15 00:27:14 -06:00
parent add0490415
commit fbf81f60ce
22 changed files with 618 additions and 521 deletions

View File

@@ -0,0 +1,36 @@
{ lib, config, proxyReverse, ... }:
let
port = 42010;
url = "maloja.${config.my.domain}";
in {
options.my.servers.maloja.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.servers.maloja.enable {
virtualisation.oci-containers = {
backend = "docker";
containers.maloja = {
image = "krateng/maloja";
ports = [ "${toString port}:${toString port}" ];
environment = {
TZ = "America/Mexico_City";
MALOJA_TIMEZONE = "-6";
PUID = "1000";
PGID = "100";
MALOJA_DATA_DIRECTORY = "/mljdata";
MALOJA_SKIP_SETUP = "true";
MALOJA_FORCE_PASSWORD = "chichis";
};
volumes = [ "${config.my.containerData}/maloja:/mljdata" ];
labels = {
"flame.type" = "application";
"flame.name" = "Maloja";
"flame.url" = url;
"flame.icon" = "bookmark-music";
};
};
};
services.nginx = {
enable = true;
virtualHosts."${url}" = proxyReverse port // { };
};
};
}