2023-02-26 02:46:35 +01:00
|
|
|
{ config, pkgs, lib, inputs, mkDomain, ... }:
|
2023-02-25 00:03:29 +01:00
|
|
|
{
|
|
|
|
# Invidious
|
|
|
|
# An open source alternative front-end to YouTube
|
|
|
|
|
2024-04-03 16:06:22 +02:00
|
|
|
/**/
|
|
|
|
#disabledModules = [ "services/web-apps/invidious.nix" ];
|
|
|
|
##imports = [ <nixos-unstable/nixos/modules/services/web-apps/invidious.nix> ];
|
|
|
|
#imports = [ ("${inputs.unstable}/nixos/modules/services/web-apps/invidious.nix") ];
|
2024-08-04 14:54:49 +02:00
|
|
|
/* services.invidious.package = pkgs.unstable.invidious; */
|
2023-02-25 01:29:13 +01:00
|
|
|
/**/
|
|
|
|
|
2023-02-25 00:03:29 +01:00
|
|
|
services.invidious = {
|
|
|
|
enable = true;
|
|
|
|
domain = mkDomain "invidious";
|
2024-08-04 14:54:49 +02:00
|
|
|
address = "127.0.0.1";
|
2023-02-25 00:03:29 +01:00
|
|
|
port = 4765;
|
2024-04-03 16:06:22 +02:00
|
|
|
# TODO: nginx.enable = true;
|
2023-02-25 00:03:29 +01:00
|
|
|
settings = {
|
|
|
|
external_port = 443;
|
|
|
|
https_only = true;
|
|
|
|
statistics_enabled = false; # api endpoint required for public instances
|
|
|
|
registration_enabled = false;
|
|
|
|
login_enabled = false;
|
|
|
|
#admins = ["pbsds"];
|
|
|
|
banner = "spis meg";
|
2024-08-04 14:54:49 +02:00
|
|
|
db.user = "invidious"; # workaround for stateVersion 23.11
|
|
|
|
db.dbname = "invidious"; # workaround for stateVersion 23.11
|
2023-02-25 00:03:29 +01:00
|
|
|
default_user_preferences = {
|
|
|
|
#feed_menu = ["Popular", "Trending", "Subscriptions", "Playlists"]
|
|
|
|
feed_menu = ["Trending" "Subscriptions" "Playlists"];
|
|
|
|
default_home = "Trending";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.nginx.virtualHosts.${mkDomain "invidious"} = lib.mkIf config.services.invidious.enable {
|
|
|
|
forceSSL = true; # addSSL = true;
|
|
|
|
enableACME = true; #useACMEHost = acmeDomain;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:${toString config.services.invidious.port}";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|