feat: teslamate

This commit is contained in:
Giulio De Pasquale 2024-11-16 13:19:23 +00:00
parent 60eccadaa8
commit 71f4de2804
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,8 @@
{ pkgs, lib, ... }:
{
postgresql = {
enable = true;
package = lib.mkForce pkgs.postgresql;
};
}

View File

@ -0,0 +1,38 @@
{ 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;
};
}