masive rewriting and setup of server files
This commit is contained in:
@@ -10,14 +10,15 @@ let
|
||||
in
|
||||
{
|
||||
options.my.servers.maloja = setup.mkOptions "maloja" "maloja" 42010;
|
||||
config = lib.mkIf cfg.enable {
|
||||
sops.secrets.maloja.sopsFile = ../../secrets/env.yaml;
|
||||
virtualisation.oci-containers.containers.maloja = {
|
||||
image = "krateng/maloja";
|
||||
config = {
|
||||
networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ];
|
||||
sops.secrets = lib.mkIf cfg.enable { maloja.sopsFile = ../../secrets/env.yaml; };
|
||||
virtualisation.oci-containers.containers.maloja = lib.mkIf cfg.enable {
|
||||
image = "krateng/maloja:latest";
|
||||
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
||||
environmentFiles = [ config.sops.secrets.maloja.path ];
|
||||
environment = {
|
||||
TZ = "America/Mexico_City";
|
||||
TZ = config.my.timeZone;
|
||||
MALOJA_TIMEZONE = "-6";
|
||||
PUID = "1000";
|
||||
PGID = "100";
|
||||
@@ -32,6 +33,8 @@ in
|
||||
"flame.icon" = "bookmark-music";
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${cfg.host}" = proxyReverse cfg.port // { };
|
||||
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
||||
proxyReverse cfg.hostName cfg.port // { }
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user