33 lines
1.1 KiB
Nix
33 lines
1.1 KiB
Nix
{ lib, config, ... }:
|
|
let
|
|
port = 9078;
|
|
url = "http://${config.my.miniserver-ip}:${toString port}";
|
|
in
|
|
{
|
|
options.my.servers.multi-scrobbler.enable = lib.mkEnableOption "enable";
|
|
config = lib.mkIf config.my.servers.multi-scrobbler.enable {
|
|
sops.secrets.multi-scrobbler.sopsFile = ../../secrets/env.yaml;
|
|
virtualisation.oci-containers.containers.multi-scrobbler = {
|
|
image = "foxxmd/multi-scrobbler:latest";
|
|
ports = [ "${toString port}:${toString port}" ];
|
|
environmentFiles = [ config.sops.secrets.multi-scrobbler.path ];
|
|
environment = {
|
|
TZ = "America/Mexico_City";
|
|
PUID = "1000";
|
|
PGID = "100";
|
|
BASE_URL = url;
|
|
DEEZER_REDIRECT_URI = "http://${config.my.miniserver-ip}:${toString port}/deezer/callback";
|
|
MALOJA_URL = config.my.servers.maloja.url;
|
|
WS_ENABLE = "true";
|
|
};
|
|
volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ];
|
|
labels = {
|
|
"flame.type" = "application";
|
|
"flame.name" = "Multi-scrobbler";
|
|
"flame.url" = url;
|
|
"flame.icon" = "broadcast";
|
|
};
|
|
};
|
|
};
|
|
}
|