added invidious

This commit is contained in:
mc-fucker 2021-11-17 17:05:26 +01:00
parent 373601fbb0
commit 850294a100
2 changed files with 27 additions and 7 deletions

19
modules/invidious.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, ... }:
{
services.invidious = {
enable = true;
port = 3001;
database = {
createLocally = false;
host = "postgres";
passwordFile = "/etc/nixos/keys/invidious-dbpassword";
};
};
networking.firewall.allowedTCPPorts = [ config.services.invidious.port ];
systemd.services.invidious.serviceConfig = {
Restart = "always";
RestartSec = "2s";
};
}
# vim: set et ts=2 sw=2 ai:

View file

@ -4,7 +4,7 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
unstable = import <nixos-unstable> {}; #unstable = import <nixos-unstable> {};
mc1 = "192.168.0.167"; mc1 = "192.168.0.167";
in in
{ {
@ -12,14 +12,15 @@
[ [
./hardware-configuration.nix ./hardware-configuration.nix
./modules/generic.nix ./modules/generic.nix
./modules/invidious.nix
]; ];
nixpkgs.overlays = [ #nixpkgs.overlays = [
(self: super: { # (self: super: {
gitea = unstable.gitea; # gitea = unstable.gitea;
htop = unstable.htop; # htop = unstable.htop;
}) # })
]; #];
networking.firewall.allowedTCPPorts = [ 3000 2222 ]; networking.firewall.allowedTCPPorts = [ 3000 2222 ];
services = { services = {