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": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1635141467, "lastModified": 1635587056,
"narHash": "sha256-H+TVE6tBSm4nAepm7HRfW7AcrndI5e4+TJwCQo4/z+s=", "narHash": "sha256-2RzriuQ8OEvY+wRUTpCgIiNNuFukKa7CiEAA0b2gsew=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "38d21595b8fb0a744aa31c5794013bf42cf98fa9", "rev": "e49cd51ebcbb916e2481555aad8d9548807e9d12",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

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