mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Change host
searx vhost still not working
This commit is contained in:
parent
784c5dfdad
commit
4b3808c042
6 changed files with 71 additions and 53 deletions
|
|
@ -1,27 +1,50 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
options.mods.server.media = {
|
||||
enable = lib.mkEnableOption {
|
||||
default = false;
|
||||
description = "enables media related servers";
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.mods.server;
|
||||
port = 2283;
|
||||
in with lib; {
|
||||
options.mods.server = {
|
||||
videos = {
|
||||
enable = mkEnableOption {
|
||||
default = false;
|
||||
description = "enables jellyfin server";
|
||||
};
|
||||
};
|
||||
|
||||
photos = {
|
||||
enable = mkEnableOption {
|
||||
default = false;
|
||||
description = "enables immich server";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.server.media.enable {
|
||||
services.jellyfin = {
|
||||
config = {
|
||||
services.jellyfin = mkIf cfg.videos.enable {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
user = "${config.mods.user.name}";
|
||||
};
|
||||
|
||||
services.immich = {
|
||||
# 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;
|
||||
host = "0.0.0.0";
|
||||
# user = "${config.mods.user.name}";
|
||||
port = port;
|
||||
};
|
||||
|
||||
users.users.immich.extraGroups = [ "video" "render" ];
|
||||
|
||||
mods.server.nginx.hosts."photos" = 2283;
|
||||
users.users.immich =
|
||||
mkIf cfg.photos.enable { extraGroups = [ "video" "render" ]; };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue