nixos-selfhost/homepage.nix

30 lines
585 B
Nix
Raw Normal View History

2024-03-27 13:08:02 +01:00
{ 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/homepage -p ${port}";
User= "sondell";
Type= "simple";
};
};
services.nginx.virtualHosts.${domain} = {
locations."/" = {
proxyPass = "http://localhost:${port}/";
proxyWebsockets = true;
};
};
}