modularization of all servers donion rings
This commit is contained in:
26
modules/servers/metube.nix
Normal file
26
modules/servers/metube.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ lib, config, proxyReverse, ... }:
|
||||
let port = 8881;
|
||||
in {
|
||||
options.my.servers.metube.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.servers.metube.enable {
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers.metube = {
|
||||
image = "ghcr.io/alexta69/metube";
|
||||
ports = [ "${toString port}:8081" ];
|
||||
volumes = [
|
||||
"${config.my.containerData}/metube:/downloads"
|
||||
"/home/jawz/.local/share/cookies.txt:/cookies.txt"
|
||||
];
|
||||
environment = {
|
||||
TZ = "America/Mexico_City";
|
||||
YTDL_OPTIONS = ''{"cookiefile":"/cookies.txt"}'';
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."bajameesta.${config.my.domain}" = proxyReverse port // { };
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user