init filebrowser
This commit is contained in:
parent
6b7f7211e1
commit
4d27e802d8
33
filebrowser.nix
Normal file
33
filebrowser.nix
Normal file
|
@ -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;
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue