46 lines
1 KiB
Nix
46 lines
1 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
domain = "files.sondell.org";
|
|
in
|
|
{
|
|
systemd.services.filebrowser = with pkgs; {
|
|
enable = true;
|
|
description = "web app file explorer";
|
|
wantedBy = [ "multi-user.target" ];
|
|
unitConfig = {
|
|
After="network-online.target";
|
|
};
|
|
serviceConfig = {
|
|
ExecStart = "${filebrowser}/bin/filebrowser -r /pool/media/ -d /var/lib/filebrowser/filebrowser.db";
|
|
User= "jellyfin";
|
|
Type= "simple";
|
|
};
|
|
};
|
|
|
|
systemd.services.tailBrowser = with pkgs; {
|
|
enable = false;
|
|
description = "serve via tailscale filebrowser";
|
|
wantedBy = [ "multi-user.target" ];
|
|
unitConfig = {
|
|
After="filebrowser.target";
|
|
};
|
|
serviceConfig = {
|
|
ExecStart = "${tailscale}/bin/tailscale serve --http 80 localhost:8080";
|
|
# User= "jellyfin";
|
|
Type= "simple";
|
|
};
|
|
};
|
|
|
|
|
|
services.nginx.virtualHosts.${domain} = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:8080/";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
}
|
|
|