mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
fix(access): gensokyo
This commit is contained in:
parent
fdfd6260c1
commit
228e2cf788
6 changed files with 17 additions and 6 deletions
|
|
@ -7,7 +7,6 @@
|
|||
inherit (lib.modules) mkDefault;
|
||||
in {
|
||||
services.nginx.virtualHosts.${config.networking.domain} = {
|
||||
default = mkDefault true;
|
||||
locations."/" = {
|
||||
root = pkgs.gensokyoZone;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.modules) mkIf mkOptionDefault;
|
||||
inherit (lib.modules) mkIf mkDefault mkOptionDefault;
|
||||
cfg = config.services.plex;
|
||||
access = config.services.nginx.access.plex;
|
||||
in {
|
||||
|
|
@ -53,11 +53,13 @@ in {
|
|||
in {
|
||||
${access.domain} = {
|
||||
locations."/" = location;
|
||||
kTLS = mkDefault true;
|
||||
inherit extraConfig;
|
||||
};
|
||||
${access.localDomain} = {
|
||||
local.enable = true;
|
||||
locations."/" = location;
|
||||
kTLS = mkDefault true;
|
||||
inherit extraConfig;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ in {
|
|||
type = str;
|
||||
default = "z2m.local.${config.networking.domain}";
|
||||
};
|
||||
tailDomain = mkOption {
|
||||
type = str;
|
||||
default = "z2m.tail.${config.networking.domain}";
|
||||
};
|
||||
port = mkOption {
|
||||
type = port;
|
||||
};
|
||||
|
|
@ -42,10 +46,7 @@ in {
|
|||
locations."/" = location;
|
||||
};
|
||||
${access.localDomain} = {
|
||||
local.enable = true;
|
||||
locations."/" = location;
|
||||
};
|
||||
"z2m.tail.${config.networking.domain}" = mkIf config.services.tailscale.enable {
|
||||
serverAliases = mkIf config.services.tailscale.enable [ access.tailDomain ];
|
||||
local.enable = true;
|
||||
locations."/" = location;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,5 +29,12 @@ with lib; {
|
|||
#proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict";
|
||||
'';
|
||||
clientMaxBodySize = "512m";
|
||||
virtualHosts.fallback = {
|
||||
serverName = null;
|
||||
default = mkDefault true;
|
||||
locations."/".extraConfig = mkDefault ''
|
||||
return 404;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue