From 134c54f5dd2c04eacd36907fcffdf05a2994352d Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Tue, 28 Dec 2021 16:00:56 +0000 Subject: [PATCH] add invidious service --- hosts/hetzner-vm/hetzner-vm.nix | 5 ++++ hosts/hetzner-vm/services/invidious.nix | 36 +++++++++++++++++++++++++ outputs.nix | 2 +- profiles/sshd/sshd.nix | 1 + 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 hosts/hetzner-vm/services/invidious.nix diff --git a/hosts/hetzner-vm/hetzner-vm.nix b/hosts/hetzner-vm/hetzner-vm.nix index 56c80bb..0aa6505 100644 --- a/hosts/hetzner-vm/hetzner-vm.nix +++ b/hosts/hetzner-vm/hetzner-vm.nix @@ -5,6 +5,7 @@ users.chaoticryptidz profiles.tailscale profiles.sshd + hosts.hetzner-vm.services.invidious (modulesPath + "/profiles/qemu-guest.nix") ]; @@ -25,6 +26,10 @@ networking.hostName = "hetzner-vm"; time.timeZone = "Europe/London"; + networking.firewall.enable = true; + networking.firewall.allowPing = false; + networking.firewall.allowedTCPPorts = [ 22 ]; + users.users.root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL4L1eBZzYXZNGBucTn/eOFp48el9JPiYt9iXQDpBSg/ chaoticryptidz@owo.monster" ]; diff --git a/hosts/hetzner-vm/services/invidious.nix b/hosts/hetzner-vm/services/invidious.nix new file mode 100644 index 0000000..37b7695 --- /dev/null +++ b/hosts/hetzner-vm/services/invidious.nix @@ -0,0 +1,36 @@ +{...}: { + services.invidious = { + enable = true; + port = 3000; + domain = "invidious.owo.monster"; + settings = { + full_refresh = true; + https_only = true; + popular_enabled = false; + statistics_enabled = true; + registration_enabled = true; + channel_threads = 2; + feed_threads = 2; + default_user_preferences = { + locale = "en-US"; + region = "GB"; + captions = ["English (auto-generated)" "English" ""]; + dark_mode = true; + feed_menu = ["Subscriptions" "Popular"]; + default_home = "Subscriptions"; + max_results = 30; + annotations = true; + annotations_subscribed = true; + comments = []; + player_style = "invidious"; + related_videos = true; + autoplay = true; + continue = false; + continue_autoplay = true; + quality = "hd720"; + local = false; + }; + }; + }; + networking.firewall.allowedTCPPorts = [ 3000 ]; +} \ No newline at end of file diff --git a/outputs.nix b/outputs.nix index 192413b..5dd8b95 100644 --- a/outputs.nix +++ b/outputs.nix @@ -27,7 +27,7 @@ in { }; deploy.nodes.hetzner-vm = { hostname = "65.21.182.73"; - username = "root" + username = "root"; profiles.system = { user = "root"; path = deploy-rs.lib.x86_64-linux.activate.nixos diff --git a/profiles/sshd/sshd.nix b/profiles/sshd/sshd.nix index a510d93..66ab81d 100644 --- a/profiles/sshd/sshd.nix +++ b/profiles/sshd/sshd.nix @@ -1,4 +1,5 @@ {...}: { services.openssh.enable = true; services.openssh.permitRootLogin = "prohibit-password"; + programs.mosh.enable = true; } \ No newline at end of file