28 lines
1.1 KiB
Nix
28 lines
1.1 KiB
Nix
{ lib, config, ... }:
|
|
let
|
|
cfg = config.my.servers.multi-scrobbler;
|
|
setup = import ../factories/setup.nix { inherit lib config; };
|
|
in
|
|
{
|
|
options.my.servers.multi-scrobbler = setup.mkOptions "multi-scrobbler" "scrobble" 9078;
|
|
config = lib.mkIf (cfg.enable && config.my.secureHost) {
|
|
sops.secrets.multi-scrobbler.sopsFile = ../../secrets/env.yaml;
|
|
virtualisation.oci-containers.containers.multi-scrobbler = {
|
|
image = "foxxmd/multi-scrobbler:0.9.11";
|
|
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
|
environmentFiles = [ config.sops.secrets.multi-scrobbler.path ];
|
|
environment = {
|
|
TZ = config.my.timeZone;
|
|
PUID = toString config.users.users.jawz.uid;
|
|
PGID = toString config.users.groups.users.gid;
|
|
BASE_URL = cfg.url;
|
|
DEEZER_REDIRECT_URI = "http://${config.my.ips.${cfg.hostName}}:${toString cfg.port}/deezer/callback";
|
|
MALOJA_URL = "http://192.168.100.15:42010";
|
|
PLEX_URL = "http://192.168.100.15:32400";
|
|
WS_ENABLE = "true";
|
|
};
|
|
volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ];
|
|
};
|
|
};
|
|
}
|