nixos-selfhost/homepage.nix
2024-04-19 16:11:18 +02:00

32 lines
630 B
Nix

{ homepage, ... }:
let
domain = "sondell.org";
port = "8118";
in
{
systemd.services.homepage = {
enable = true;
description = "homepage with links to selfhosted services";
wantedBy = [ "multi-user.target" ];
unitConfig = {
After="network-online.target";
};
serviceConfig = {
ExecStart = "${homepage}/bin/home-prod -p ${port}";
User= "sondell";
Type= "simple";
};
};
services.nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${port}/";
proxyWebsockets = true;
};
};
}