nixos-selfhost/filebrowser.nix

44 lines
1,005 B
Nix
Raw Normal View History

2024-03-06 20:48:43 +01:00
{ config, pkgs, ... }:
let
domain = "files.sondell.org";
in
{
2024-03-06 22:14:44 +01:00
systemd.services.filebrowser = with pkgs; {
2024-03-06 20:48:43 +01:00
enable = true;
description = "web app file explorer";
wantedBy = [ "multi-user.target" ];
2024-03-06 22:14:44 +01:00
unitConfig = {
After="network-online.target";
};
serviceConfig = {
ExecStart = "${filebrowser}/bin/filebrowser -r /mnt/movie_drive -d /var/lib/filebrowser/filebrowser.db";
User= "jellyfin";
Type= "simple";
};
2024-03-06 20:48:43 +01:00
};
2024-03-25 00:18:55 +01:00
systemd.services.tailBrowser = with pkgs; {
2024-04-02 19:24:26 +02:00
enable = false;
2024-03-25 00:18:55 +01:00
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";
};
};
2024-03-06 20:48:43 +01:00
services.nginx.virtualHosts.${domain} = {
locations."/" = {
proxyPass = "http://localhost:8080/";
proxyWebsockets = true;
};
};
}