updates and simplified nginx config

This commit is contained in:
Vivian 2021-10-30 18:31:37 +02:00
parent d61b7a376c
commit 73af29186b
2 changed files with 17 additions and 33 deletions

View file

@ -54,11 +54,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1635141467,
"narHash": "sha256-H+TVE6tBSm4nAepm7HRfW7AcrndI5e4+TJwCQo4/z+s=",
"lastModified": 1635587056,
"narHash": "sha256-2RzriuQ8OEvY+wRUTpCgIiNNuFukKa7CiEAA0b2gsew=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "38d21595b8fb0a744aa31c5794013bf42cf98fa9",
"rev": "e49cd51ebcbb916e2481555aad8d9548807e9d12",
"type": "github"
},
"original": {

View file

@ -3,8 +3,16 @@
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
let
k8s_proxy = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://10.42.42.150:8000/";
proxyWebsockets = true;
};
};
in {
imports = [
# Import common config
../../common/generic-lxc.nix
@ -31,7 +39,6 @@
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."ha.0x76.dev" = {
enableACME = true;
forceSSL = true;
@ -41,33 +48,10 @@
};
};
# TODO: Make a function for adding hostnames to k8s endpoint(s).
virtualHosts."zookeeper.0x76.dev" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://10.42.42.150:8000/";
proxyWebsockets = true;
};
};
virtualHosts."wooloofan.club" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://10.42.42.150:8000/";
proxyWebsockets = true;
};
};
virtualHosts."whoami.wooloofan.club" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://10.42.42.150:8000/";
proxyWebsockets = true;
};
};
# Kubernetes endpoints
virtualHosts."zookeeper.0x76.dev" = k8s_proxy;
virtualHosts."wooloofan.club" = k8s_proxy;
virtualHosts."whoami.wooloofan.club" = k8s_proxy;
};
security.acme.email = "victorheld12@gmail.com";