2025-01-13 11:02:51 +01:00
|
|
|
{homepage, ...}: let
|
|
|
|
domain1 = "sondell.org";
|
|
|
|
domain2 = "start.sondell.org";
|
2024-03-27 13:08:02 +01:00
|
|
|
port = "8118";
|
2025-01-13 11:02:51 +01:00
|
|
|
hostSettings = {
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:${port}/";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
2024-03-27 13:08:02 +01:00
|
|
|
systemd.services.homepage = {
|
|
|
|
enable = true;
|
|
|
|
description = "homepage with links to selfhosted services";
|
2025-01-13 11:02:51 +01:00
|
|
|
wantedBy = ["multi-user.target"];
|
2024-03-27 13:08:02 +01:00
|
|
|
unitConfig = {
|
2025-01-13 11:02:51 +01:00
|
|
|
After = "network-online.target";
|
2024-03-27 13:08:02 +01:00
|
|
|
};
|
|
|
|
serviceConfig = {
|
2024-04-10 11:01:54 +02:00
|
|
|
ExecStart = "${homepage}/bin/home-prod -p ${port}";
|
2025-01-13 11:02:51 +01:00
|
|
|
User = "sondell";
|
|
|
|
Type = "simple";
|
2024-03-27 13:08:02 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2025-01-13 11:02:51 +01:00
|
|
|
services.nginx.virtualHosts.${domain1} = hostSettings;
|
|
|
|
services.nginx.virtualHosts.${domain2} = hostSettings;
|
2024-03-27 13:08:02 +01:00
|
|
|
}
|