diff --git a/common/icons/invidious.png b/common/icons/invidious.png new file mode 100644 index 0000000..75f72e6 Binary files /dev/null and b/common/icons/invidious.png differ diff --git a/docs/ports.md b/docs/ports.md index d0c80ad..ab22423 100644 --- a/docs/ports.md +++ b/docs/ports.md @@ -17,3 +17,4 @@ The idea is to always use consecutive ports, but never go back and try to recycl | 8411 | [prometheus node exporter](../hosts/nixos/lapetus/services/prometheus.nix) | | 8412 | [prometheus nginx exporter](../hosts/nixos/lapetus/services/prometheus.nix) | | 8413 | [commafeed](../hosts/nixos/lapetus/services/commafeed.nix) | +| 8414 | [invidious](../hosts/nixos/lapetus/services/invidious.nix) | diff --git a/hosts/nixos/common/optional/services/postgres.nix b/hosts/nixos/common/optional/services/postgres.nix new file mode 100644 index 0000000..8d0ef20 --- /dev/null +++ b/hosts/nixos/common/optional/services/postgres.nix @@ -0,0 +1,3 @@ +{ + environment.persistence."/persist/state".directories = [ "/var/lib/postgres" ]; +} diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index fa2cb48..d09754f 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -16,6 +16,7 @@ ./services/prometheus.nix ./services/grafana.nix ./services/commafeed.nix + ./services/invidious.nix ./filesystems ./hardware ]; diff --git a/hosts/nixos/lapetus/services/homer.nix b/hosts/nixos/lapetus/services/homer.nix index 28cbbb0..cbeb435 100644 --- a/hosts/nixos/lapetus/services/homer.nix +++ b/hosts/nixos/lapetus/services/homer.nix @@ -118,6 +118,20 @@ in ]; } # }}} + # {{{ Entertainment + { + name = "Entertainment"; + icon = fa "gamepad"; + items = [ + { + name = "Invidious"; + subtitle = "Youtube client"; + logo = icon "invidious.png"; + url = "https://yt.moonythm.dev"; + } + ]; + } + # }}} ]; }; }; diff --git a/hosts/nixos/lapetus/services/invidious.nix b/hosts/nixos/lapetus/services/invidious.nix new file mode 100644 index 0000000..3f89048 --- /dev/null +++ b/hosts/nixos/lapetus/services/invidious.nix @@ -0,0 +1,29 @@ +{ config, ... }: { + imports = [ + ../../common/optional/services/nginx.nix + ../../common/optional/services/postgres.nix + ]; + + services.invidious = { + enable = true; + domain = "yt.moonythm.dev"; + port = 8414; + + nginx.enable = true; + + settings = { + captcha_enabled = false; + admins = [ "prescientmoon" ]; + default_user_preferences = { + default_home = "Subscriptions"; + max_results = 40; + comments = [ "youtube" "reddit" ]; + save_player_pos = true; + automatic_instance_redirect = true; + }; + }; + }; + + services.nginx.virtualHosts.${config.services.invidious.domain} = + config.satellite.proxy config.services.invidious.port { }; +}