Files
infrastructure/machines/durruti/host_config.nix
kalipso 46849ff517
All checks were successful
Check flake syntax / flake-check (push) Successful in 6m16s
[zineshop] update proxypass
2025-04-14 15:15:41 +02:00

103 lines
2.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://10.0.0.10";
extraConfig = ''
'';
};
};
services.nginx.virtualHosts."cloud.malobeo.org" = {
forceSSL = true;
enableACME= true;
locations."/" = {
proxyPass = "http://10.0.0.10";
extraConfig = ''
'';
};
};
services.nginx.virtualHosts."grafana.malobeo.org" = {
forceSSL = true;
enableACME= true;
locations."/" = {
proxyPass = "http://10.0.0.10";
extraConfig = ''
'';
};
};
services.nginx.virtualHosts."tasklist.malobeo.org" = {
forceSSL = true;
enableACME= true;
locations."/" = {
proxyPass = "http://10.0.0.10";
extraConfig = ''
'';
};
};
services.nginx.virtualHosts."shop.malobeo.org" = {
forceSSL = true;
enableACME= true;
locations."/" = {
proxyPass = "http://10.0.0.10";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Authorization $http_authorization;
'';
};
};
services.nginx.virtualHosts."status.malobeo.org" = {
forceSSL = true;
enableACME= true;
locations."/" = {
proxyPass = "http://10.0.0.12";
extraConfig = ''
'';
};
};
};
}