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; + # ''; + }; + }; +} +