diff --git a/hosts/architect/postgres.nix b/hosts/architect/postgres.nix new file mode 100644 index 0000000..0ebd896 --- /dev/null +++ b/hosts/architect/postgres.nix @@ -0,0 +1,8 @@ +{ pkgs, lib, ... }: + +{ + postgresql = { + enable = true; + package = lib.mkForce pkgs.postgresql; + }; +} diff --git a/hosts/architect/teslamate.nix b/hosts/architect/teslamate.nix new file mode 100644 index 0000000..03e924a --- /dev/null +++ b/hosts/architect/teslamate.nix @@ -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; + }; +}