mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 10:30:14 +01:00
vscode works now
This commit is contained in:
parent
3945a335b1
commit
c94e085e66
|
@ -37,10 +37,9 @@
|
|||
enableACME = true;
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
#proxy_set_header Host vinzenz-lpt2.donkey-pentatonic.ts.net;
|
||||
proxy_ssl_verify = false;
|
||||
proxy_bind 100.88.118.60;
|
||||
'';
|
||||
proxyPass = "https://vinzenz-lpt2.donkey-pentatonic.ts.net:8542/";
|
||||
proxyPass = "http://vinzenz-lpt2:8542/";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -43,95 +43,17 @@
|
|||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ssh-host-key''
|
||||
];
|
||||
|
||||
# TODO: move to own module
|
||||
services.openvscode-server = {
|
||||
enable = true;
|
||||
telemetryLevel = "off";
|
||||
port = 8542;
|
||||
host = "127.0.0.1";
|
||||
host = "100.103.93.126"; # tailscale
|
||||
extraPackages = with pkgs; [nodejs];
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"vscode" = {
|
||||
serverName = "vinzenz-lpt2";
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://127.0.0.1:8542";
|
||||
extraConfig = ''
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
listen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 5000;
|
||||
ssl = true;
|
||||
}
|
||||
];
|
||||
|
||||
serverAliases = ["localhost" "vinzenz-lpt2.lan"];
|
||||
addSSL = true;
|
||||
sslCertificateKey = "/etc/nginx-secrets/nginx-selfsigned.key";
|
||||
sslCertificate = "/etc/nginx-secrets/nginx-selfsigned.crt";
|
||||
};
|
||||
"app" = {
|
||||
serverName = "vinzenz-lpt2";
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://127.0.0.1:3000/";
|
||||
};
|
||||
};
|
||||
|
||||
listen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 5001;
|
||||
ssl = true;
|
||||
}
|
||||
];
|
||||
|
||||
serverAliases = ["localhost" "vinzenz-lpt2.lan"];
|
||||
addSSL = true;
|
||||
sslCertificateKey = "/etc/nginx-secrets/nginx-selfsigned.key";
|
||||
sslCertificate = "/etc/nginx-secrets/nginx-selfsigned.crt";
|
||||
};
|
||||
"api" = {
|
||||
serverName = "vinzenz-lpt2";
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://127.0.0.1:3002/";
|
||||
};
|
||||
};
|
||||
|
||||
listen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 5002;
|
||||
ssl = true;
|
||||
}
|
||||
];
|
||||
|
||||
serverAliases = ["localhost" "vinzenz-lpt2.lan"];
|
||||
addSSL = true;
|
||||
sslCertificateKey = "/etc/nginx-secrets/nginx-selfsigned.key";
|
||||
sslCertificate = "/etc/nginx-secrets/nginx-selfsigned.crt";
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
checkReversePath = "loose";
|
||||
allowedTCPPorts = [8542];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
{
|
||||
from = 5000;
|
||||
to = 5005;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue