1
Fork 0
satellite/hosts/nixos/lapetus/services/invidious.nix

46 lines
1.3 KiB
Nix
Raw Normal View History

2024-10-11 12:44:13 +02:00
{ config, pkgs, ... }:
{
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-06-13 15:47:36 +02:00
satellite.nginx.at.yt.port = config.satellite.ports.invidious;
2024-03-11 15:46:27 +01:00
services.invidious = {
enable = true;
2024-06-13 15:47:36 +02:00
domain = config.satellite.nginx.at.yt.host;
port = config.satellite.nginx.at.yt.port;
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";
2024-10-11 12:44:13 +02:00
comments = [
"youtube"
"reddit"
2024-10-13 08:00:44 +02:00
2024-10-11 12:44:13 +02:00
];
2024-03-11 15:46:27 +01:00
save_player_pos = true;
automatic_instance_redirect = true;
};
2024-10-11 12:44:13 +02:00
# The error when updating to 24.05 asked me to set this
db.user = "invidious";
2024-03-11 15:46:27 +01:00
};
2024-04-01 05:57:56 +02:00
2024-10-11 16:11:29 +02:00
package = pkgs.invidious.overrideAttrs (_oldAttrs: {
src = pkgs.fetchFromGitHub {
owner = "iv-org";
repo = "invidious";
fetchSubmodules = true;
2024-11-09 12:45:25 +01:00
rev = "b173d4acf21563d47d26718eca7932878fb424e6";
sha256 = "04z11yai4yrjpd9im38dgx1p2qnh8px1zq28m1ay9jjk2s143j4r";
2024-10-11 16:11:29 +02:00
};
});
2024-03-11 15:46:27 +01:00
};
}