configuration.nix/hosts/rico0/services/default.nix

54 lines
1.1 KiB
Nix
Raw Normal View History

_:
let
2024-10-27 23:09:50 +05:30
inherit (import ../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
in
{
2024-06-29 17:52:32 +05:30
imports = [
2024-07-18 22:05:29 +05:30
./apps
2024-06-29 17:52:32 +05:30
./btrfs.nix
./ssh.nix
2024-07-18 22:05:29 +05:30
../../shared/caddy.nix
../../shared/frp.nix
2024-06-29 17:52:32 +05:30
];
2024-07-18 22:05:29 +05:30
services.caddy = {
2024-08-11 20:07:28 +05:30
virtualHosts = {
"gateway.labs.adtya.xyz" = {
2024-10-27 23:09:50 +05:30
inherit logFormat;
2024-08-11 20:07:28 +05:30
extraConfig = ''
2024-10-27 23:09:50 +05:30
${tlsAcmeDnsChallenge}
2024-08-11 20:07:28 +05:30
reverse_proxy 192.168.0.1:80
'';
};
"ap1.labs.adtya.xyz" = {
2024-10-27 23:09:50 +05:30
inherit logFormat;
2024-08-11 20:07:28 +05:30
extraConfig = ''
2024-10-27 23:09:50 +05:30
${tlsAcmeDnsChallenge}
2024-08-11 20:07:28 +05:30
reverse_proxy 192.168.1.1:80
'';
};
"ap2.labs.adtya.xyz" = {
2024-10-27 23:09:50 +05:30
inherit logFormat;
2024-08-11 20:07:28 +05:30
extraConfig = ''
2024-10-27 23:09:50 +05:30
${tlsAcmeDnsChallenge}
2024-08-11 20:07:28 +05:30
reverse_proxy 192.168.1.2:80
'';
};
"switch.labs.adtya.xyz" = {
2024-10-27 23:09:50 +05:30
inherit logFormat;
2024-08-11 20:07:28 +05:30
extraConfig = ''
2024-10-27 23:09:50 +05:30
${tlsAcmeDnsChallenge}
2024-08-11 20:07:28 +05:30
reverse_proxy 192.168.1.3:80
'';
};
"frp.labs.adtya.xyz" = {
2024-10-27 23:09:50 +05:30
inherit logFormat;
2024-08-11 20:07:28 +05:30
extraConfig = ''
2024-10-27 23:09:50 +05:30
${tlsAcmeDnsChallenge}
2024-08-11 20:07:28 +05:30
reverse_proxy 10.10.10.1:7500
'';
};
2024-07-18 22:05:29 +05:30
};
};
2024-06-29 17:52:32 +05:30
}