From de609b4e69f1dd03386b49533d02eaf6725979c7 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 25 Mar 2024 00:18:55 +0100 Subject: [PATCH] derp --- configuration.nix | 2 ++ filebrowser.nix | 14 ++++++++++++++ flake.nix | 4 ++-- tunnel.nix | 25 ++++++++++++++----------- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/configuration.nix b/configuration.nix index 9043a0f..5ae6dfe 100644 --- a/configuration.nix +++ b/configuration.nix @@ -112,10 +112,12 @@ # wget cloudflared filebrowser + dufs git helix nil starship + tailscale ]; programs.fish= { diff --git a/filebrowser.nix b/filebrowser.nix index e6fba73..5d346c6 100644 --- a/filebrowser.nix +++ b/filebrowser.nix @@ -18,6 +18,20 @@ in }; }; + systemd.services.tailBrowser = with pkgs; { + enable = true; + description = "serve via tailscale filebrowser"; + wantedBy = [ "multi-user.target" ]; + unitConfig = { + After="filebrowser.target"; + }; + serviceConfig = { + ExecStart = "${tailscale}/bin/tailscale serve --http 80 localhost:8080"; + # User= "jellyfin"; + Type= "simple"; + }; + }; + services.nginx.virtualHosts.${domain} = { locations."/" = { diff --git a/flake.nix b/flake.nix index 9ebf30f..7eaca98 100644 --- a/flake.nix +++ b/flake.nix @@ -11,11 +11,11 @@ ./audiobooks.nix ./tunnel.nix ./forgejo.nix - # ./nextcloud.nix + ./nextcloud.nix ./jellyfin.nix ./filebrowser.nix + ./tail.nix # ./matrix.nix - # ./tail.nix # ./coturn.nix ]; diff --git a/tunnel.nix b/tunnel.nix index 8591e7c..51eadf2 100644 --- a/tunnel.nix +++ b/tunnel.nix @@ -1,16 +1,19 @@ {...}: { - services.nginx.enable = true; - services.cloudflared = { - enable = true; - tunnels = { - "tulpan" = { - credentialsFile = "/etc/nixos/.secrets/tulpan-tunnel.json"; - default = "http_status:404"; - ingress = { - "*.sondell.org" = "http://localhost:80"; + services.nginx = { + enable = true; + clientMaxBodySize = "10g"; + }; + services.cloudflared = { + enable = true; + tunnels = { + "tulpan" = { + credentialsFile = "/etc/nixos/.secrets/tulpan-tunnel.json"; + default = "http_status:404"; + ingress = { + "*.sondell.org" = "http://localhost:80"; + }; }; }; - }; -}; + }; }