27 lines
704 B
Nix
27 lines
704 B
Nix
{
|
|
lib,
|
|
config,
|
|
inputs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.servers.metube;
|
|
in
|
|
{
|
|
options.my.servers.metube = inputs.self.lib.mkServerOptions "metube" "bajameesta" 8881 lib;
|
|
config.virtualisation.oci-containers.containers.metube = lib.mkIf cfg.enable {
|
|
image = "ghcr.io/alexta69/metube:latest";
|
|
ports = [ "${toString cfg.port}:8081" ];
|
|
volumes = [
|
|
"${config.my.containerData}/metube:/downloads"
|
|
"/home/jawz/.librewolf/cookies.txt:/cookies.txt"
|
|
];
|
|
environment = {
|
|
TZ = config.my.timeZone;
|
|
YTDL_OPTIONS = ''{"cookiefile":"/cookies.txt"}'';
|
|
PUID = toString config.users.users.jawz.uid;
|
|
PGID = toString config.users.groups.piracy.gid;
|
|
};
|
|
};
|
|
}
|