mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 18:40:14 +01:00
hostname parameter
This commit is contained in:
parent
84657bb2a8
commit
1cf414683b
|
@ -4,7 +4,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
servicesDomain = "services.zerforschen.plus";
|
servicesDomain = "services.zerforschen.plus";
|
||||||
mkServiceConfig = port: {
|
mkServiceConfig = host: port: {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
@ -15,9 +15,10 @@
|
||||||
auth_pam "Password Required";
|
auth_pam "Password Required";
|
||||||
auth_pam_service_name "nginx";
|
auth_pam_service_name "nginx";
|
||||||
'';
|
'';
|
||||||
proxyPass = "http://vinzenz-lpt2.donkey-pentatonic.ts.net:${toString port}/";
|
proxyPass = "http://${host}:${toString port}/";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
lpt2 = "vinzenz-lpt2.donkey-pentatonic.ts.net";
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
(import ./modules {
|
(import ./modules {
|
||||||
|
@ -59,10 +60,10 @@ in {
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"preon-app.${servicesDomain}" = mkServiceConfig 8541;
|
"preon-app.${servicesDomain}" = mkServiceConfig lpt2 8541;
|
||||||
"preon-api.${servicesDomain}" = mkServiceConfig 8542;
|
"preon-api.${servicesDomain}" = mkServiceConfig lpt2 8542;
|
||||||
"vscode.${servicesDomain}" = lib.mkMerge [
|
"vscode.${servicesDomain}" = lib.mkMerge [
|
||||||
(mkServiceConfig 8543)
|
(mkServiceConfig lpt2 8543)
|
||||||
{locations."/" .proxyWebsockets = true;}
|
{locations."/" .proxyWebsockets = true;}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue