2025-01-14 18:06:19 -06:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
bannergen = pkgs.buildGoModule {
|
|
|
|
pname = "bannergen";
|
2025-01-16 17:10:44 -06:00
|
|
|
version = "0.2.0";
|
2025-01-14 18:06:19 -06:00
|
|
|
src = pkgs.fetchgit {
|
|
|
|
url = "https://git.chandlerswift.com/chandlerswift/bannergen";
|
2025-01-16 17:10:44 -06:00
|
|
|
rev = "v0.2.0";
|
|
|
|
sha256 = "sha256-D8f7jPcgs6yD9D+V4uy3FIBqqqZVehZM7hJ6tdERKqc=";
|
2025-01-14 18:06:19 -06:00
|
|
|
};
|
|
|
|
vendorHash = "sha256-yKZdNhNyUOqywLy/RDjcziJ0FfrpuNcNMwyUAnRov60=";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
systemd.services.bannergen = {
|
|
|
|
enable = true;
|
|
|
|
after = [ "network.target" ];
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${bannergen}/bin/bannergen";
|
|
|
|
Restart = "on-failure";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.caddy.virtualHosts."bannergen.chandlerswift.com".extraConfig = ''
|
|
|
|
reverse_proxy localhost:8000
|
|
|
|
'';
|
|
|
|
}
|