nixos-selfhost/filebrowser.nix
2024-03-06 20:48:43 +01:00

34 lines
716 B
Nix

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