dotfiles.nix/nixos/viridian/services/lighttpd/default.nix

34 lines
692 B
Nix
Raw Normal View History

2024-08-08 09:02:42 +08:00
{config, ...}: {
2024-06-06 20:34:56 +08:00
services.lighttpd = {
enable = true;
port = 5624;
2024-10-16 04:59:59 +08:00
document-root = "/srv/www/sajenim.dev";
2024-06-06 20:34:56 +08:00
};
services.traefik.dynamicConfigOptions.http.routers = {
lighttpd = {
rule = "Host(`sajenim.dev`)";
entryPoints = [
"websecure"
];
service = "lighttpd";
};
};
services.traefik.dynamicConfigOptions.http.services = {
lighttpd.loadBalancer.servers = [
2024-08-08 09:02:42 +08:00
{url = "http://127.0.0.1:${toString config.services.lighttpd.port}";}
2024-06-06 20:34:56 +08:00
];
};
2024-10-16 04:59:59 +08:00
environment.persistence."/persist" = {
directories = [
{
directory = "/srv/www";
user = "lighttpd";
group = "lighttpd";
}
];
};
2024-06-06 20:34:56 +08:00
}