From 4d27e802d84404e0e712749e1f729ae7a4ff5a3d Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 6 Mar 2024 20:48:43 +0100 Subject: [PATCH] init filebrowser --- filebrowser.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 filebrowser.nix diff --git a/filebrowser.nix b/filebrowser.nix new file mode 100644 index 0000000..d725bd5 --- /dev/null +++ b/filebrowser.nix @@ -0,0 +1,33 @@ +{ config, pkgs, ... }: + +let + domain = "files.sondell.org"; + # derp = "hi"; +in +{ + # + # services.audiobookshelf = { + # enable = true; + # port = 8000; + # }; + systemd.services.fileBrowser = with pkgs; { + enable = true; + description = "web app file explorer"; + wantedBy = [ "multi-user.target" ]; + serviceConfig.ExecStart = "${filebrowser}/bin/filebrowser -r /mnt/media_drive"; + }; + + + services.nginx.virtualHosts.${domain} = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://localhost:8080/"; + proxyWebsockets = true; + # extraConfig = '' + # access_log /var/log/nginx/access.log main if=$forgejo_access_log; + # ''; + }; + }; +} +