mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
test: setting up opencloud and microvms
This commit is contained in:
parent
0ed3bb9b64
commit
b5929e0834
8 changed files with 79 additions and 35 deletions
33
modules/nixos/services/caddy/caddy0/default.nix
Executable file
33
modules/nixos/services/caddy/caddy0/default.nix
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
{ flake, ... }:
|
||||
let
|
||||
inherit (flake.config.services) instances;
|
||||
inherit (flake.config.machines.devices) eris;
|
||||
opencloud = instances.opencloud0;
|
||||
service = instances.caddy;
|
||||
in
|
||||
{
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"${opencloud.domains.url0}" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy ${eris.ip.address0}:${builtins.toString service.ports.port1} {
|
||||
transport http {
|
||||
tls
|
||||
tls_insecure_skip_verify
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
service.ports.port0
|
||||
service.ports.port1
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue