diff --git a/audiobooks.nix b/audiobooks.nix index 02cb859..090d809 100644 --- a/audiobooks.nix +++ b/audiobooks.nix @@ -1,8 +1,7 @@ -{ config, ... }: +{ ... }: let domain = "books.sondell.org"; - # derp = "hi"; in { # @@ -11,16 +10,13 @@ in port = 8000; }; + services.nginx.enable = true; services.nginx.virtualHosts.${domain} = { - enableACME = true; - forceSSL = true; + default = true; locations."/" = { proxyPass = "http://localhost:8000/"; proxyWebsockets = true; - # extraConfig = '' - # access_log /var/log/nginx/access.log main if=$forgejo_access_log; - # ''; }; }; } diff --git a/configuration.nix b/configuration.nix index 5b86ee0..9043a0f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -110,6 +110,7 @@ environment.systemPackages = with pkgs; [ # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # wget + cloudflared filebrowser git helix diff --git a/flake.nix b/flake.nix index b4b2d7c..b411e45 100644 --- a/flake.nix +++ b/flake.nix @@ -8,14 +8,15 @@ specialArgs = attrs; modules = [ ./configuration.nix - ./forgejo.nix - ./nextcloud.nix ./audiobooks.nix - ./jellyfin.nix - ./filebrowser.nix - ./matrix.nix - ./tail.nix - ./coturn.nix + ./tunnel.nix + # ./forgejo.nix + # ./nextcloud.nix + # ./jellyfin.nix + # ./filebrowser.nix + # ./matrix.nix + # ./tail.nix + # ./coturn.nix ]; }; diff --git a/tunnel.nix b/tunnel.nix new file mode 100644 index 0000000..963a0a9 --- /dev/null +++ b/tunnel.nix @@ -0,0 +1,15 @@ +{...}: +{ + services.cloudflared = { + enable = true; + tunnels = { + "tulpan" = { + credentialsFile = "/etc/nixos/.secrets/tulpan-tunnel.json"; + default = "http_status:404"; + ingress = { + "*.sondell.org" = "http://localhost:80"; + }; + }; + }; +}; +}