Add frontends

This commit is contained in:
muon 2024-12-10 13:31:39 +00:00
parent 4b3808c042
commit 92528d7121
8 changed files with 87 additions and 58 deletions

View file

@ -1,10 +1,10 @@
{ pkgs, lib, config, ... }:
let
cfg = config.mods.server;
port = 2283;
port = cfg.nginx.ports.photos;
in with lib; {
options.mods.server = {
videos = {
movies = {
enable = mkEnableOption {
default = false;
description = "enables jellyfin server";
@ -20,24 +20,12 @@ in with lib; {
};
config = {
services.jellyfin = mkIf cfg.videos.enable {
services.jellyfin = mkIf cfg.movies.enable {
enable = true;
openFirewall = true;
user = "${config.mods.user.name}";
};
# mods.server.nginx.ports.photos = port;
services.nginx.virtualHosts."photos.muon.host" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://10.0.0.3:${toString port}";
proxyWebsockets = true; # needed if you need to use WebSocket
extraConfig =
# required when the server wants to use HTTP Authentication
"proxy_pass_header Authorization;";
};
};
services.immich = mkIf cfg.photos.enable {
enable = true;
openFirewall = true;