30 lines
585 B
Nix
30 lines
585 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/homepage -p ${port}";
|
||
|
User= "sondell";
|
||
|
Type= "simple";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
services.nginx.virtualHosts.${domain} = {
|
||
|
locations."/" = {
|
||
|
proxyPass = "http://localhost:${port}/";
|
||
|
proxyWebsockets = true;
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
|