2024-04-01 06:29:29 +02:00
|
|
|
{ config, pkgs, ... }: {
|
2024-03-11 15:46:27 +01:00
|
|
|
imports = [
|
|
|
|
../../common/optional/services/nginx.nix
|
|
|
|
../../common/optional/services/postgres.nix
|
|
|
|
];
|
|
|
|
|
2024-03-11 16:30:04 +01:00
|
|
|
sops.secrets.invidious_hmac_key.sopsFile = ../secrets.yaml;
|
|
|
|
sops.templates."invidious_hmac_key.json" = {
|
|
|
|
content = ''{ "hmac_key": "${config.sops.placeholder.invidious_hmac_key}" }'';
|
2024-03-11 16:21:53 +01:00
|
|
|
mode = "0444"; # I don't care about this key that much, as I'm the only user of this instance
|
|
|
|
};
|
|
|
|
|
2024-03-11 16:08:32 +01:00
|
|
|
services.nginx.virtualHosts.${config.services.invidious.domain} =
|
|
|
|
config.satellite.proxy config.services.invidious.port { };
|
|
|
|
|
2024-03-11 15:46:27 +01:00
|
|
|
services.invidious = {
|
|
|
|
enable = true;
|
|
|
|
domain = "yt.moonythm.dev";
|
|
|
|
port = 8414;
|
2024-03-11 16:30:04 +01:00
|
|
|
hmacKeyFile = config.sops.templates."invidious_hmac_key.json".path;
|
2024-03-11 15:46:27 +01:00
|
|
|
|
|
|
|
settings = {
|
|
|
|
captcha_enabled = false;
|
|
|
|
admins = [ "prescientmoon" ];
|
|
|
|
default_user_preferences = {
|
|
|
|
default_home = "Subscriptions";
|
|
|
|
comments = [ "youtube" "reddit" ];
|
|
|
|
save_player_pos = true;
|
|
|
|
automatic_instance_redirect = true;
|
|
|
|
};
|
|
|
|
};
|
2024-04-01 05:57:56 +02:00
|
|
|
|
|
|
|
# REASON: the current invidious is broken, and cannot play videos
|
2024-04-01 06:36:58 +02:00
|
|
|
package = pkgs.invidious.overrideAttrs (_oldAttrs: {
|
2024-04-01 06:29:29 +02:00
|
|
|
src = pkgs.fetchFromGitHub {
|
2024-04-01 05:57:56 +02:00
|
|
|
owner = "iv-org";
|
|
|
|
repo = "invidious";
|
|
|
|
fetchSubmodules = true;
|
2024-04-27 21:38:06 +02:00
|
|
|
rev = "eda7444ca46dbc3941205316baba8030fe0b2989";
|
|
|
|
sha256 = "0iafxgb93jxx9ams6ll2yx8il4d7h89a630hcx9y8jj4gn3ax7v1";
|
2024-04-01 05:57:56 +02:00
|
|
|
};
|
|
|
|
});
|
2024-03-11 15:46:27 +01:00
|
|
|
};
|
|
|
|
}
|