multi-scrobbler migrated to homepage setup
This commit is contained in:
@@ -1,22 +1,27 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
proxyReverse,
|
||||
setup,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = 9078;
|
||||
url = "http://${config.my.miniserver-ip}:${toString port}";
|
||||
cfg = config.my.servers.multi-scrobbler;
|
||||
in
|
||||
{
|
||||
options.my.servers.multi-scrobbler.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.servers.multi-scrobbler.enable {
|
||||
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 = {
|
||||
image = "foxxmd/multi-scrobbler:latest";
|
||||
ports = [ "${toString port}:${toString port}" ];
|
||||
ports = [ "${toString cfg.port}:${toString cfg.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";
|
||||
BASE_URL = cfg.url;
|
||||
DEEZER_REDIRECT_URI = "http://${config.my.miniserver-ip}:${toString cfg.port}/deezer/callback";
|
||||
MALOJA_URL = config.my.servers.maloja.url;
|
||||
WS_ENABLE = "true";
|
||||
};
|
||||
@@ -24,9 +29,10 @@ in
|
||||
labels = {
|
||||
"flame.type" = "application";
|
||||
"flame.name" = "Multi-scrobbler";
|
||||
"flame.url" = url;
|
||||
"flame.url" = cfg.url;
|
||||
"flame.icon" = "broadcast";
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${cfg.host}" = proxyReverse cfg.port // { };
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user