masive rewriting and setup of server files
This commit is contained in:
@@ -10,18 +10,19 @@ let
|
||||
in
|
||||
{
|
||||
options.my.servers.multi-scrobbler = setup.mkOptions "multi-scrobbler" "scrobble" 9078;
|
||||
config = lib.mkIf cfg.enable {
|
||||
sops.secrets.multi-scrobbler.sopsFile = ../../secrets/env.yaml;
|
||||
virtualisation.oci-containers.containers.multi-scrobbler = {
|
||||
config = {
|
||||
networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ];
|
||||
sops.secrets = lib.mkIf cfg.enable { multi-scrobbler.sopsFile = ../../secrets/env.yaml; };
|
||||
virtualisation.oci-containers.containers.multi-scrobbler = lib.mkIf cfg.enable {
|
||||
image = "foxxmd/multi-scrobbler:latest";
|
||||
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
||||
environmentFiles = [ config.sops.secrets.multi-scrobbler.path ];
|
||||
environment = {
|
||||
TZ = "America/Mexico_City";
|
||||
TZ = config.my.timeZone;
|
||||
PUID = "1000";
|
||||
PGID = "100";
|
||||
BASE_URL = cfg.url;
|
||||
DEEZER_REDIRECT_URI = "http://${config.my.miniserver-ip}:${toString cfg.port}/deezer/callback";
|
||||
DEEZER_REDIRECT_URI = "http://${config.my.ips.${cfg.hostName}}:${toString cfg.port}/deezer/callback";
|
||||
MALOJA_URL = config.my.servers.maloja.url;
|
||||
WS_ENABLE = "true";
|
||||
};
|
||||
@@ -33,6 +34,8 @@ in
|
||||
"flame.icon" = "broadcast";
|
||||
};
|
||||
};
|
||||
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