39 lines
722 B
Nix
39 lines
722 B
Nix
|
{ config, pkgs, lib, ... }:
|
||
|
|
||
|
let
|
||
|
domain = "media.giugl.io";
|
||
|
port = 8096;
|
||
|
allowLan = true;
|
||
|
in
|
||
|
{
|
||
|
# needed since StateDirectory does not accept symlinks
|
||
|
systemd.services.jellyfin.serviceConfig.StateDirectory = lib.mkForce "";
|
||
|
|
||
|
architect.vhost.${domain} = with config.architect.networks; {
|
||
|
dnsInterfaces = [ "lan" "tailscale" ];
|
||
|
locations = {
|
||
|
"/" = {
|
||
|
inherit port allowLan;
|
||
|
|
||
|
allow = [
|
||
|
tailscale.net
|
||
|
];
|
||
|
};
|
||
|
|
||
|
"/socket" = {
|
||
|
inherit port allowLan;
|
||
|
|
||
|
proxyWebsockets = true;
|
||
|
allow = [
|
||
|
tailscale.net
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
services.teslamate = {
|
||
|
enable = true;
|
||
|
package = pkgs.teslamatePkgs.teslamate;
|
||
|
};
|
||
|
}
|