dotfiles.nix/nixos/viridian/services/httpd.nix

36 lines
671 B
Nix

{ ... }:
{
services.httpd = {
enable = true;
virtualHosts."sajenim.dev" = {
documentRoot = "/srv/services/httpd/sajenim.dev";
listen = [{
ip = "192.168.1.102";
port = 5624;
}];
adminAddr = "its.jassy@pm.me";
};
};
services.traefik.dynamicConfigOptions.http.routers = {
httpd = {
rule = "Host(`sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "httpd";
};
};
services.traefik.dynamicConfigOptions.http.services = {
httpd.loadBalancer.servers = [
{ url = "http://192.168.1.102:5624"; }
];
};
}