Files
infrastructure/machines/durruti/host_config.nix
kalipso 370d975dbb
All checks were successful
Evaluate Hydra Jobs / eval-hydra-jobs (push) Successful in 4m7s
Evaluate Hydra Jobs / eval-hydra-jobs (pull_request) Successful in 4m7s
[durruti] add docs.malobeo.org to host_config
2024-11-19 15:23:07 +01:00

55 lines
1.2 KiB
Nix

{ config, lib, options, pkgs, ... }:
with lib;
let
cfg = config.services.malobeo;
in
{
options = {
services.malobeo = {
enable = mkOption {
default = false;
type = types.bool;
description = lib.mdDoc "Enable malobeo infrastructure.";
};
host_ip = mkOption {
type = types.str;
default = "";
description = lib.mdDoc "ip of nix container provided for malo";
};
};
};
config = mkIf cfg.enable
{
assertions = [
{
assertion = cfg.host_ip != "";
message = ''
You need to specify host_ip of the nix container
'';
}
];
services.nginx.virtualHosts."docs.malobeo.org" = {
forceSSL = true;
enableACME= true;
locations."/".proxyPass = "http://${cfg.host_ip}:9000";
};
services.nginx.virtualHosts."tasklist.malobeo.org" = {
forceSSL = true;
enableACME= true;
locations."/".proxyPass = "http://${cfg.host_ip}:8080";
};
services.nginx.virtualHosts."booking.dynamicdiscord.de" = {
forceSSL = true;
enableACME= true;
locations."/".proxyPass = "http://${cfg.host_ip}:80";
};
};
}