fix(koi): improved dns in nginx

This commit is contained in:
alina 🌸 2024-08-03 22:33:50 +03:00
parent a194fc64b5
commit 4351e7b40d
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
12 changed files with 19 additions and 13 deletions

View file

@ -43,7 +43,7 @@ in {
useACMEHost = "stupid.fish";
locations."/" = {
proxyPass = "http://navidrome.docker:4533/";
proxyPass = "http://navidrome.docker:4533$request_uri";
extraConfig = ''
proxy_buffering off;

View file

@ -32,7 +32,7 @@ in {
'';
locations."/" = {
proxyPass = "http://pds.pds.docker:3000/";
proxyPass = "http://pds.pds.docker:3000$request_uri";
proxyWebsockets = true;
};
};

View file

@ -22,7 +22,7 @@
'';
locations."/" = {
proxyPass = "http://web.sharkey.docker/";
proxyPass = "http://web.sharkey.docker$request_uri";
proxyWebsockets = true;
};
};

View file

@ -37,11 +37,11 @@ in {
useACMEHost = "tei.su";
locations."/" = {
proxyPass = "http://teisu.docker:4321/";
proxyPass = "http://teisu.docker:4321$request_uri";
};
locations."/.well-known/" = {
proxyPass = "http://teisu.docker:4321/.well-known/";
proxyPass = "http://teisu.docker:4321$request_uri";
extraConfig = ''
add_header 'Access-Control-Allow-Origin' '*';
'';

View file

@ -78,7 +78,7 @@ in
useACMEHost = "stupid.fish";
locations."/" = {
proxyPass = "http://torrent.containers/";
proxyPass = "http://torrent.containers$request_uri";
# https://github.com/qbittorrent/qBittorrent/issues/6962
extraConfig = ''

View file

@ -48,7 +48,7 @@ in {
useACMEHost = "tei.su";
locations."/" = {
proxyPass = "http://vault.containers/";
proxyPass = "http://vault.containers$request_uri";
proxyWebsockets = true;
};
};

View file

@ -43,7 +43,7 @@ in {
useACMEHost = "tei.su";
locations."/" = {
proxyPass = "http://verdaccio.docker:4873/";
proxyPass = "http://verdaccio.docker:4873$request_uri";
# https://verdaccio.org/docs/reverse-proxy
extraConfig = ''

View file

@ -8,7 +8,7 @@
useACMEHost = "tei.su";
locations."/" = {
proxyPass = "http://umami.umami.docker:3000/";
proxyPass = "http://umami.umami.docker:3000$request_uri";
};
};
}

View file

@ -69,6 +69,7 @@ in
};
systemd.services.coredns = {
after = [ "docker.service" "docker.socket" ];
serviceConfig = {
DynamicUser = pkgs.lib.mkForce false;
User = "coredns";

View file

@ -58,9 +58,17 @@ in {
}
'';
resolver = {
addresses = [ "127.0.0.1" ];
ipv6 = false;
valid = "30s";
};
proxyResolveWhileRunning = true;
# declared in the relevant service nixfiles
# virtualHosts = { ... };
};
systemd.services.nginx.after = [ "coredns.service" ];
security.acme.acceptTerms = true;
security.acme.defaults.dnsResolver = "8.8.8.8:53"; # coredns tends to cache these too much

View file

@ -27,7 +27,7 @@ in
useACMEHost = "stupid.fish";
locations."/" = {
proxyPass = "http://10.42.0.3:8123/";
proxyPass = "http://10.42.0.3:8123$request_uri";
proxyWebsockets = true;
};
};

View file

@ -20,9 +20,6 @@ note to self on what needs to be installed on the host manually:
- `/etc/secureboot/keys` - secure boot keys, generated with `sudo nix-shell -p sbctl --run "sbctl create-keys"`
- to enroll fde onto tpm: `sudo systemd-cryptenroll /dev/nvme0n1p2 --tpm2-device=auto --tpm2-pcrs=0+2+7`
nginx may not start the first time, its fine, just run `sudo systemctl restart nginx` and it should work.
its likely due to docker containers not resolving yet. todo fix this
### teidesu-osx
`cp /var/run/current-system/Library/Fonts/* /Library/Fonts` - copy nix-managed fonts to system fonts (waiting for [this PR](https://github.com/LnL7/nix-darwin/pull/754))