modularization of all servers donion rings
This commit is contained in:
43
modules/servers/multi-scrobbler.nix
Normal file
43
modules/servers/multi-scrobbler.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ lib, config, proxyReverse, ... }:
|
||||
let
|
||||
port = 9078;
|
||||
domain = "scrobble.${config.my.domain}";
|
||||
url = "https://${domain}";
|
||||
in {
|
||||
options.my.servers.multi-scrobbler.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.servers.multi-scrobbler.enable {
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers.multi-scrobbler = {
|
||||
image = "foxxmd/multi-scrobbler";
|
||||
ports = [ "${toString port}:${toString port}" ];
|
||||
environment = {
|
||||
TZ = "America/Mexico_City";
|
||||
PUID = "1000";
|
||||
PGID = "100";
|
||||
BASE_URL = url;
|
||||
# JELLYFIN_USER = "jawz";
|
||||
# JELLYFIN_SERVER = "DaniloFlix";
|
||||
DEEZER_CLIENT_ID = "657431";
|
||||
DEEZER_CLIENT_SECRET = "cb2ad03682dd5a55dfef857388ef181e";
|
||||
DEEZER_REDIRECT_URI = "http://192.168.1.69:9078/deezer/callback";
|
||||
MALOJA_URL = url;
|
||||
MALOJA_API_KEY =
|
||||
"LsnY2Ed484JlzUmF6EwhpGJ0gUCjJ2G5s1oJTwALJN8w1N3K6eXpfjBQp3raNPLA";
|
||||
WS_ENABLE = "true";
|
||||
};
|
||||
volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ];
|
||||
labels = {
|
||||
"flame.type" = "application";
|
||||
"flame.name" = "Multi-scrobbler";
|
||||
"flame.url" = url;
|
||||
"flame.icon" = "broadcast";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."${domain}" = proxyReverse port // { };
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user