simple impl of exposes thingy

This commit is contained in:
Vivian 2023-05-04 15:14:36 +02:00
parent 882b2840d9
commit f9819aa99c
11 changed files with 78 additions and 20 deletions

View file

@ -100,6 +100,12 @@
"hedgedoc" = {
ip = "10.42.42.23";
mac = "86:BC:0C:18:BC:9B";
exposes = {
md = {
domain = "md.0x76.dev";
port = 3000;
};
};
};
"zmeura" = {
ip = "10.42.42.24";

View file

@ -6,6 +6,7 @@
let
db_name = "hedgedoc";
db_user = "hedgedoc";
inherit (config.meta.exposes.md) port;
vs = config.vault-secrets.secrets;
in {
imports = [ ];
@ -40,7 +41,7 @@ in {
environmentFile = "${vs.hedgedoc}/environment";
settings = {
host = "0.0.0.0";
port = 3000;
inherit port;
sessionSecret = "$SESSION_SECRET";
domain = "md.0x76.dev";
protocolUseSSL = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, hosts, ... }:
let
proxy = url: {
enableACME = true;
@ -44,9 +44,11 @@ in {
package = pkgs.nginxMainline;
# Templated
virtualHosts.${hosts.olympus.hedgedoc.exposes.md.domain} = proxy "http://hedgedoc.olympus:${toString hosts.olympus.hedgedoc.exposes.md.port}/";
# 0x76.dev
virtualHosts."ha.0x76.dev" = proxy "http://home-assistant.olympus:8123/";
virtualHosts."md.0x76.dev" = proxy "http://hedgedoc.olympus:3000/";
virtualHosts."git.0x76.dev" = proxy "http://gitea.olympus:3000";
virtualHosts."o.0x76.dev" = proxy "http://minio.olympus:9000";
virtualHosts."grafana.0x76.dev" =